📜  无窗口 cmd - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:17.992000             🧑  作者: Mango

代码示例1
1. WIN-key + R  -->  %appdata%
2. create a new text document called "invisible.vbs"
3. With a text editor, edit "invisible.vbs". Paste the following line, then save and close:
CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0, False
4 create a new shortcut to run: 
A) (command e.g. open paint):  wscript.exe %appdata%invisible.vbs "CMD /k mspaint"
B) (run .bat file):  wscript.exe %appdata%invisible.vbs "CMD /k C:\full\path\to\myFile.bat"