vbs execute command code example
Example 1: how to open cmd with vbd
'Dim oShell
Set oShell = WScript.CreateObject ("WScript.Shell")
oShell.run "cmd.exe /C copy ""S:Claims\Sound.wav"" ""C:\WINDOWS\Media\Sound.wav""
Set oShell = Nothing'
Example 2: vbs run
Set oShell = CreateObject("WScript.Shell")
' Run the command dir in a hidden window without waiting for it to finish
oShell.Run "dir", 0, false
' Run the command dir in a visible window and wait for it to finish
oShell.Run "dir", 1, true