Last active
August 29, 2015 13:55
-
-
Save 17/8727266 to your computer and use it in GitHub Desktop.
hrun.vbs is a command utility, that allows you to run multiple apps and commands without any window in the background.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
cscript hrun.vbs "cmd /c ipconfig /all >result.txt" >nul | |
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dim oArgs, oShell, iCountArgs | |
set oArgs = wscript.Arguments | |
set oShell = CreateObject("WScript.Shell") | |
iCountArgs = oArgs.Count | |
if iCountArgs < 1 then | |
wscript.echo "Error: Too few arguments" | |
wscript.quit | |
end if | |
for iIndex = 0 to iCountArgs - 1 | |
oShell.run oArgs(iIndex), 0 | |
next |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment