Slippy Posted March 17, 2004 Share Posted March 17, 2004 How can I use Run() to specify parameters to the .exe? for example this one program I have you can specify -GUI or -commandline, how can I use Run() to specify -commandline? I tried Run("file.exe -commandline", "C:\Directory\") and Run("file.exe" -commandline, "C:\Directory\") Any help would be appreciated. Link to comment Share on other sites More sharing options...
vickerps Posted March 17, 2004 Share Posted March 17, 2004 Run ("c:\epost\bin\EpostMS.exe -Install" ,"",@SW_HIDE) OR Run ("c:\epost\bin\EpostMS.exe -Install") the last two are optional or you can use _RunDos Link to comment Share on other sites More sharing options...
Developers Jos Posted March 17, 2004 Developers Share Posted March 17, 2004 You could try it this way: Run('"C:\Directory\file.exe" "-commandline"', 'C:\Directory\'") 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...
Slippy Posted March 17, 2004 Author Share Posted March 17, 2004 (edited) humm I have: global $file, $directory, $parameters $file = IniRead("config.ini", "Settings", "File", "Error") $directory = IniRead("config.ini", "Settings", "Directory", "Error") $parameters = IniRead("config.ini", "Settings", "Parameters", "Error") Run("$directory & $file $parameters") but it actually tries to run $directory & $file $parameters, not what the variables are set to. I found this out by doing: MsgBox(0, "Test", "$directory & $file $parameters") and it returned $directory & $file $parameters Edited March 17, 2004 by Slippy Link to comment Share on other sites More sharing options...
Developers Jos Posted March 17, 2004 Developers Share Posted March 17, 2004 (edited) MsgBox(0, "Test", $directory & " " & $file & " " & $parameters) EDIT: Run($directory & "\" & $file & " " & $parameters) Edited March 17, 2004 by JdeB 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...
Slippy Posted March 17, 2004 Author Share Posted March 17, 2004 Ah. Thanks. Run($directory & $file & " " & $parameters) worked 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