Hi !
I wonder if there are any tricks or tips can be done to hide the CMD prompt when I execute this HTA script?
Thank you !
http://www.paulsadowski.com/wsh/Trace.hta.htm
Traceroute
set objShell = CreateObject("WScript.Shell")
strOut=""
sub traceroute
cmdarg="%comspec% /c tracert.exe " & T1.value
set objExCmd = objShell.Exec(cmdarg)
strOut=objExCmd.StdOut.ReadAll
Set regEx = New RegExp
regEx.Pattern = "[fnrv]+"
regEx.Global = True
regEx.Multiline = True
strOut = regEx.Replace(strOut, "")
TraceOut.innerHTML= strOut
end sub
//-->
Traceroute HTA by Paul R. Sadowski (11/2001)
Hostname:
[HTA] How to hide the CMD prompt on HTA Script ?
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
[HTA] How to hide the CMD prompt on HTA Script ?
Note that the code, as posted on the linked web site, is incorrect and will not always display correctly. The HTML is incomplete and structured poorly.
The links on the page are old and no longer functional. The statement that Exec is not available in older versions of WSH has not been true since Windows 2000 which is almost 14 years ago.
It appears that this page was copied blindly from somewhere or it has been broken or hacked by someone. It also does not show a knowledge of the fundamentals of scripting or of HTML.
I would be careful using this code as a model for anything as it uses methods and techniques that are very misleading to anyone wishing to learn to script.
You should focus your attention on the scripting lesssons on the MS technet site or purchase one of the Sapien books. Getting a proper understanding of the fundamentals is critical and will save you a lot of time.
The links on the page are old and no longer functional. The statement that Exec is not available in older versions of WSH has not been true since Windows 2000 which is almost 14 years ago.
It appears that this page was copied blindly from somewhere or it has been broken or hacked by someone. It also does not show a knowledge of the fundamentals of scripting or of HTML.
I would be careful using this code as a model for anything as it uses methods and techniques that are very misleading to anyone wishing to learn to script.
You should focus your attention on the scripting lesssons on the MS technet site or purchase one of the Sapien books. Getting a proper understanding of the fundamentals is critical and will save you a lot of time.