netjunkie247 Posted February 7, 2007 Share Posted February 7, 2007 There is an application located on every workstation in our domain... currently the exe to update the app is on the local workstations as well... meaning that either the admin must manually login to all boxes to run the update for the app - use psexec and connect to all the boxes -- or give higher rights to the local users... all of these seem to be bad options =o) SO... the idea is to have a RunAS command to temp use domain admin creds' and install any updates... then reset the creds' and exit the process... I'm also considering compiling this into an .exe and use it in our login script to fully automate the process from the users... Below is the current code I have-- ---------------------------------------------------------- Dim $UserName, $Domain, $Password, $RunProgram, $RunPath $UserName = "USERACCOUNT" $Password = "PASSWORD" $Domain = "DOMAIN" RunAsSet ( $UserName, $Domain, $Password ) $RunProgram = "update.exe" $RunPath = "C:\program files\etc..." RunWait($RunProgram, $RunPath) ; Finished! ---------------------------------------------------------- - If anyone has some direction on this... any help is greatly appreciated! Link to comment Share on other sites More sharing options...
Developers Jos Posted February 7, 2007 Developers Share Posted February 7, 2007 make $RunProgram contain the Path as wel: $RunProgram = "C:\program files\etc...\update.exe" SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
netjunkie247 Posted February 7, 2007 Author Share Posted February 7, 2007 thanks for the response... I did as you said-- the 'go' feature to test the code before compiling responded the following: >"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Program Files\AutoIt3\Examples\bancpac-update.au3" /autoit3dir "C:\Program Files\AutoIt3" /UserParams +>14:17:07 Starting AutoIt3Wrapper v.1.7.6 >Running:(3.2.2.0):C:\Program Files\AutoIt3\autoit3.exe "C:\Program Files\AutoIt3\Examples\bancpac-update.au3" C:\Program Files\AutoIt3\Examples\bancpac-update.au3 (30) : ==> Unable to execute the external program.: RunWait($RunProgram, $RunPath) The parameter is incorrect. +>14:17:07 AutoIT3.exe ended.rc:0 +>14:17:08 AutoIt3Wrapper Finished >Exit code: 0 Time: 1.901 -thanks for your help with this... Link to comment Share on other sites More sharing options...
Developers Jos Posted February 7, 2007 Developers Share Posted February 7, 2007 would be helpfull when you post the code portion with the error ... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
netjunkie247 Posted February 7, 2007 Author Share Posted February 7, 2007 sorry... code was pretty much same as before... I was able to get it working just fine-- no errors-- compiled the .exe and tested-- works great! thanks for the help! Also, if i added: RunAsSet () --- toward the 'end' of the script... does it reset the permissions back to the standard user profile that is logged in after the update.exe part of the script runs?? Link to comment Share on other sites More sharing options...
Developers Jos Posted February 7, 2007 Developers Share Posted February 7, 2007 RunAsSet () --- toward the 'end' of the script... does it reset the permissions back to the standard user profile that is logged in after the update.exe part of the script runs??Only the shelled application will have the RunAsSet() credentials, not the script itself. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now