This hta program list name of wlan ssid. I want to hide command prompt popping up when using objshell.Exec(). How to do this without creating a temporary text document? Is there any way using objshell.Run() function?
<script language="VBScript" type="text/vbscript">
sub StartPrevious
set objShell = CreateObject("WScript.Shell")
cmdarg="%comspec% /c netsh wlan show hosted"
iReturn=objShell.Run(cmdarg, 0, True)
If iReturn = 0 Then
set objExCmd=objShell.Exec ("netsh wlan show hosted")
strContents =objExCmd.StdOut.ReadAll
Set objRegEx = New RegExp
objRegEx.IgnoreCase = True
objRegEx.Global = True
objRegEx.Multiline = True
objRegEx.Pattern = """([^""]+)"""
set colMatches = objRegEx.Execute(strContents)
For each objMatch in colMatches
MsgBox "SSID name: " & objMatch.Value
Next
End If
end sub
</script>