krasoco
Invisible.vbs (ss64.com/vb/run.html)
This one line VBScript can be used to run a command in an invisible window:
Code: Select all
CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False
' An example running 'Demo.cmd' with invisible.vbs
wscript.exe "invisible.vbs" "demo.cmd" //nologo
----------------------------
#2 15 Sep 2017 16:38
Pyprohly
Yes, but not with that VBS script.
By using the following code for Invisible.vbs,
Code: Select all
Dim Args()
ReDim Args(WScript.Arguments.Count - 1)
For i = 0 To WScript.Arguments.Count - 1
Args(i) = """" & WScript.Arguments(i) & """"
Next
CreateObject("WScript.Shell").Run Join(Args), 0, False
Code: Select all
wscript.exe //nologo "invisible.vbs" "demo.cmd" arg1 arg2...
----------------------------
#3 16 Sep 2017 20:33
krasoco
Thank you!
original thread: https://ss64.org/oldforum/viewtopic.php?id=2240