|
|
|||||||
I am working on a script which uses Runas to install security patches, and Sanur to provide the password. Runas and Sanur work fine. The problem is that once sanur.exe quits on my system, the script continues to run without waiting for the security patches to complete. Here's the runas line in my script: Shell '%comspec% /c "runas /env /user:$domain\$userid "$program" | \\sawpdc01\patches\sanur.exe password"' Is there something wrong with this line in my script, or is there a way that I can make the sytem wait until the patch is installed before continuing? Thanks |
||||||||
|
|
|||||||
quote:Ignore me, I'm talking garbage [ 24. October 2003, 16:27: Message edited by: Richard H. ] |
||||||||
|
|
|||||||
I have a RunAs program designed by ANB Software that is a upgraded version of the Windows RunAs. FreeWare, and allows you to type the password within the command line, so it will allow you to do the command you are using without using sanur.exe . But remember to make it secure you should use KixCrypt to wrap it up in a exe file. RunAs - ANB Software Download. |
||||||||
|
|
|||||||
code:This should be the command you want for the old RunAs or below using the new RunAs software.Shell '%COMSPEC% /c RunAs.exe /user:'+$User+' "'+$CommandLine+'" | C:\sanur.exe '+$Pass' code:Shell '%COMSPEC% /c RunAs.exe /user:'+$User+' /pass:'+$Pass+' "'+$CommandLine+'"' |
||||||||
|
|
|||||||
Hawks problem is not that the job doesn't run (it does) but that he wants the script to suspend while it is running. |
||||||||
|
|
|||||||
Thanks everyone! I downloaded the upgraded version of RunAs and at first I had the same problem using that file. However, that version of RunAs allows you to put a "/w" to wait for the program to finish, which did the trick! |
||||||||
|
|
|||||||
Great, another script that puts administrative passwords into it in plain text! Please read Installing an Application as an Admin and NEVER put admin passwords into scripts! |