|
I am trying to install a microsoft patch using runas with the /quiet switch. I am trying to get the native runas command to function right within Win2k. The command works fine with no switches involved but when I add the switch to the exe I am trying to run, I get an error the I am not running runas correctly and gives me the dump of all of the runas switches. I don't care if the password is in the clear at this point. I am just trying a proof of concept for my boss.
Here is my script: ; setting debug (options: ON/OFF) DEBUG ON ; Setting varibles
$CDROM = READVALUE("HKEY_LOCAL_MACHINE\SYSTEM\DISK","\Device\CdRom0") if @ERROR = 0 ? "Drive Letter $CDROM is used for the CDROM" ENDIF
$hotfixexe="c:\test\ms04-020\Windows2000-KB841872-x86-ENU.exe" $switches=" /quiet" ? $hotfixexe + $switches
run "runas.exe /user:%COMPUTERNAME%\admin " + $hotfixexe + $switches sleep 1 sendkeys ("password{ENTER}")
quit
What am I doing wrong?
|