vbscript - How to hide command prompt poping up in hta? -
this hta program list name of wlan ssid. want hide command prompt popping when using objshell.exec(). how without creating temporary text document? there 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 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) each objmatch in colmatches msgbox "ssid name: " & objmatch.value next end if end sub </script>
Comments
Post a Comment