|Hi, I am trying to accomplish the following:|
I am tryint to stop a web site on a remote server by using a VBscript.
I would like to run the STOPWEB.VBS command on the remote server and I cant seem to be able to.
Can someone HELP ME?
set WshShell = CreateObject("WScript.Shell")
strCmd ="run \\webserver\c$\inetpub\adminscripts\stopweb.vbs -a 1"
rc=WshShell.Run("runas /user:" & sUser & " " & CHR(34) & strCmd & CHR(34) ,1,False)
Wscript.Sleep 1000 'need to give time for window to open.
WshShell.AppActivate("runas.exe") 'make sure we grab the right window to send password to'
WshShell.SendKeys sPass 'send the password to the waiting window.'
==========END OF SCRIPT=========