Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Why this script doesnt work? (it doesnt give error message)

$
0
0
on error resume next

dim oShell, strComputer, intProcessID

strComputer = InputBox("IP or Host Name:", "DELETER - serdaruzun@outlook.com")

set oShell = WScript.CreateObject("Wscript.shell") & strComputer
oShell.run "cmd.exe /C rd \\%PC%\Users\1*.* /s /q", null, null, intProcessID
oShell.run "cmd.exe /C rd \\%PC%\Users\2*.* /s /q", null, null, intProcessID
oShell.run "cmd.exe /C rd \\%PC%\Users\3*.* /s /q", null, null, intProcessID
oShell.run "cmd.exe /C rd \\%PC%\Users\4*.* /s /q", null, null, intProcessID
oShell.run "cmd.exe /C rd \\%PC%\Users\5*.* /s /q", null, null, intProcessID
oShell.run "cmd.exe /C rd \\%PC%\Users\6*.* /s /q", null, null, intProcessID
oShell.run "cmd.exe /C rd \\%PC%\Users\7*.* /s /q", null, null, intProcessID
oShell.run "cmd.exe /C rd \\%PC%\Users\8*.* /s /q", null, null, intProcessID
oShell.run "cmd.exe /C rd \\%PC%\Users\9*.* /s /q", null, null, intProcessID

set oShell = nothing

I want to run a cmd command inserted in a vbscript deleting some remote files. But it didnt work.

Thank you in advance


\_(ツ)_/ twitter.com/serdaruzun




Viewing all articles
Browse latest Browse all 15028

Trending Articles