max23ed Posted October 22, 2019 Share Posted October 22, 2019 Hi, as the title says, here is my code but its not working ; Get the parameter from open file dialog GUICtrlSetData($locationtxt, FileOpenDialog("Select the program", '', "Supported files (*.exe;*.msi;*.reg;*.inf)|Executable Files (*.exe)|Microsoft Installer files (*.msi)|Registry files (*.reg)|Inf files (*.inf)", 3)) ; store the value in a variable $abc = GUICtrlRead($locationtxt) ; Run the program and pass the parameter value Run("ussf.exe " & $abc ) ; If i do it this way, its working but i want the parameter value from the open dialog not fixed Run("ussf.exe C:\Users\project\ccsetup563.exe") Please show me how i can do it and i'm sorry if someone asked about this topic before. Link to comment Share on other sites More sharing options...
david1337 Posted October 22, 2019 Share Posted October 22, 2019 Hi max23ed, Try with Shellexecute. ShellExecute("ussf.exe", $abc) max23ed 1 Link to comment Share on other sites More sharing options...
max23ed Posted October 22, 2019 Author Share Posted October 22, 2019 Hey David, Thank you for the reply, its working now perfectly. Thank you. Link to comment Share on other sites More sharing options...
david1337 Posted October 22, 2019 Share Posted October 22, 2019 You're welcome Link to comment Share on other sites More sharing options...
Zedna Posted October 22, 2019 Share Posted October 22, 2019 (edited) In Run() try to specify working directory and also put parameter into quotes: Run('ussf.exe "' & $abc & '"', @ScriptDir) Also try absolute path to EXE file. Edited October 22, 2019 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search 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