Runas Error when trying to run a .bat file as Admin
- From: "Irene" <irene.enulf@xxxxxxxxx>
- Date: 16 Apr 2007 11:13:42 -0700
Hello,
I am getting an error when trying to run a vbscript that executes a
batch which installs a font.
Vbscript
Set objNetwork = Wscript.CreateObject("WScript.Network")
On Error Resume Next
Set WshShell = CreateObject("WScript.Shell")
strProgram = "N:\instFont.bat"
WshShell.Run "cmd.exe /k runas /env /user:xxxxx@xxxxxxxxx " & _
chr(34) & strProgram & chr(34)
Do Until Success = True
Success = WshShell.AppActivate("C:\WINDOWS")
Wscript.sleep 500
Loop
WshShell.SendKeys "XXXXXX"
WshShell.SendKeys "{ENTER}"
the error:
Attempting to start N:\instFont.bat as user "i
RUNAS ERROR: Unable to run - N:\instFont.bat
3: The system cannot find the path specified.
I am mapped to the N drive, i have tried using UNC, and i have tried
to copy the file to the C drive
Thanks,
Irene
.
- Follow-Ups:
- Re: Runas Error when trying to run a .bat file as Admin
- From: Shenan Stanley
- Re: Runas Error when trying to run a .bat file as Admin
- Prev by Date: Re: Share Security+Log
- Next by Date: Re: HELP! Terminal Service Trojan??
- Previous by thread: Re: Share Security+Log
- Next by thread: Re: Runas Error when trying to run a .bat file as Admin
- Index(es):