Run a batch file in a completely hidden way

MSFT相關
回覆文章
yehlu
Site Admin
文章: 3245
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

Run a batch file in a completely hidden way

文章 yehlu »

https://superuser.com/questions/62525/r ... hidden-way


62
down vote
accepted
Solution 1:

Save this one line of text as file invisible.vbs:

CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False
To run any program or batch file invisibly, use it like this:

wscript.exe "C:\Wherever\invisible.vbs" "C:\Some Other Place\MyBatchFile.bat"
To also be able to pass-on/relay a list of arguments use only two double quotes

CreateObject("Wscript.Shell").Run "" & WScript.Arguments(0) & "", 0, False
Example: Invisible.vbs "Kill.vbs ME.exe"

Solution 2:

Use a command line tool to silently launch a process : Quiet, hidecon or hideexec.
回覆文章

回到「Microsoft」