Sign in to follow this  
Followers 0
Slippy

Autoit3 Newbie Needs Some Help

6 posts in this topic

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. :whistle:

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 by Slippy

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

MsgBox(0, "Test", $directory & " " & $file & " " & $parameters)

EDIT:

Run($directory & "\" & $file & " " & $parameters)

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Ah. Thanks.

Run($directory & $file & " " & $parameters) worked :whistle:

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0