Agent Orange Posted October 11, 2006 Share Posted October 11, 2006 (edited) I'm attempting to use my main program to call another autoit exe using the run command and passing 3 parameters to it. I'm having an issue getting the Run command to work. I'm trying to use the RunAsSet command to run the second .exe with elevated rights. Is it possible to do this? Below is the code for the main program and the second program. ;here's part of the main program.... Func _changepswd() If Not @error Then RunAsSet("username", "Domain", "pswd") Run("c:\changer.exe " & GUICtrlRead($UserString) & (GUICtrlRead($currentpassword) & GUICtrlRead($newpassword)) ;it is dying here with a parse error.... RunAsSet() EndIf Msgbox(0,"Status","Password Change Was Successful. Click Ok to Exit") DriveMapDel("\\server\share") Exit(0) EndFunc oÝ÷ Øw«z+-ç(uçè®Ø^r§êé®+jf®¶s`¢b33c´FöÖå7G&ærÒgV÷C¶BFöÖâgV÷C°¢b33cµW6W$ö&¢Òö&¤vWBgV÷CµväåC¢òògV÷C²fײb33c´FöÖå7G&ærfײgV÷C²ògV÷C²fײb33c´6ÖFÆæU³Ò¢b33cµW6W$ö&¢ä6ævU77v÷&Bb33c´6ÖFÆæU³%ÒÂb33c´6ÖFÆæU³5Ò¢b33cµW6W$ö&¢å6WDæfð¤W@ what do you think? Edited October 11, 2006 by Agent Orange Link to comment Share on other sites More sharing options...
Developers Jos Posted October 11, 2006 Developers Share Posted October 11, 2006 Looks like a Brace to many:Run("c:\changer.exe " & GUICtrlRead($UserString) & (GUICtrlRead($currentpassword) & GUICtrlRead($newpassword)) Don't you need spaces between the parameters"?Run("c:\changer.exe " & GUICtrlRead($UserString) & " " & GUICtrlRead($currentpassword) & " " & GUICtrlRead($newpassword)) 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...
Agent Orange Posted October 11, 2006 Author Share Posted October 11, 2006 Thank you! sometimes you look at something so long you miss the obvious Link to comment Share on other sites More sharing options...
Agent Orange Posted October 11, 2006 Author Share Posted October 11, 2006 Ok. I got the password change to work...however I'm getting an error I can't figure out at the end. Here the code for the main program: If Not @error Then RunAsSet("user", "domain", "pswd") Run("c:\changer.exe " & GUICtrlRead($UserString) & " " & GUICtrlRead($currentpassword) & " " & GUICtrlRead($newpassword)) RunAsSet() EndIf Msgbox(0,"Status","Password Change Was Successful. Click Ok to Exit") Exit(0) Any ideas? Link to comment Share on other sites More sharing options...
Richard Robertson Posted October 11, 2006 Share Posted October 11, 2006 SetInfo needs parameters if it is a function, or at least parenthesis. Or it needs to be read or set, if it is a property. 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