dzebazapelo Posted September 24, 2007 Share Posted September 24, 2007 I am new to AutoIT scripting. I would appreciate it if someone could help.Aim:Trying to install an application on the first logon with lockdown or restricted accountI am using AutoIt script executed as part of the Active Setup on the first logon. C:\Program Files\folder\folder\folder\Inst.exe""RunAsSet" function shown below then executes the Install.exe located in C:\Progra~1\marimba\Delivery\CL00687\Install.exe" below. Install.exe is another script which installs one of the applications required in my office. For this test I am trying to execute "regedit.exe" on the first logon. RunAsSet("username", @Computername, "password")RunWait("C:\Progra~1\folder\folder\folder\Install.exe")RunAsSet()Problem:Running the above script works when logging on with local lockdown users but not with domain user controlled by a group policy. I get the folowwing error message:Line 0 (File C:\Program Files\folder\folder\folder\Inst.exe"):Run Wait(regedit.exe)Error: Unable to execute the external program.The directory name is invalidAre there any other switches that I am missing? Please help!!!!!!!!! Link to comment Share on other sites More sharing options...
SadBunny Posted September 24, 2007 Share Posted September 24, 2007 Maybe a path issue? (Another path in domain policy than in local users?) Try specifying the path in the runwait command. Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
Developers Jos Posted September 24, 2007 Developers Share Posted September 24, 2007 Maybe a path issue? (Another path in domain policy than in local users?) Try specifying the path in the runwait command.... and also specify the WorkDir parameter because it could be that the default workdir isn't available with the RunAs credentials. 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...
dzebazapelo Posted September 24, 2007 Author Share Posted September 24, 2007 ... and also specify the WorkDir parameter because it could be that the default workdir isn't available with the RunAs credentials.I already tried specifying the full path but no luck. How do I add the WorkDir parameter, Can you please assist as I am using the AutoIT for the first time. Link to comment Share on other sites More sharing options...
Developers Jos Posted September 24, 2007 Developers Share Posted September 24, 2007 (edited) Just check the helpfile for these things... its pretty clear: RunWait -------------------------------------------------------------------------------- Runs an external program and pauses script execution until the program finishes. RunWait ( "filename" [, "workingdir" [, flag]] )So in your case it could be something like: RunWait("Program with full path"",@TempDir) Jos Edited September 24, 2007 by Jos 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...
dzebazapelo Posted September 24, 2007 Author Share Posted September 24, 2007 Thank you Guys for all your help, that worked. This was my final code: RunAsSet("Username", @Computername, "Password") RunWait("Script.exe", "C:\Progra~1\folder\folder\folder", @WorkingDir) RunAsSet() 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