Display Sorted content from strings VBS
I need a command to display particular from the result of the execution of
cmd argument in vbs. I've the code as
<script language="VBScript" type="text/vbscript">
set objShell = CreateObject("WScript.Shell")
strOut=""
sub start
cmdarg="%comspec% /c netsh wlan show hosted "
set objExCmd = objShell.Exec(cmdarg)
strOut=objExCmd.StdOut.ReadAll
Set regEx = New RegExp
regEx.Pattern = "[\f\n\r\v]+"
regEx.Global = True
regEx.Multiline = True
strOut = regEx.Replace(strOut, "<br>")
TraceOut.innerHTML= strOut
end sub
</script>
This list all output after execution as below:
Hosted network settings
Mode : Allowed
SSID name : "MyWiFi"
Max number of clients : 10
Authentication : WPA2-Personal
Cipher : CCMP
Hosted network status
Status : Not started
I need to display only SSID name. Ie, "MyWiFi" It changes whenever i
change ssid name. So it is not always "MyWiFi"
No comments:
Post a Comment