这个hta程序列表名称为wlan ssid。我想在使用objshell.Exec()时隐藏命令提示符弹出。如何在不创建临时文本文档的情况下执行此操作?有没有办法使用objshell.Run()函数?
<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>