Sign in to follow this  
Followers 0
bradvexille

Problems With Run()

4 posts in this topic

I'm having problems with Run..

Run("Diablo II.exe","C:\ProgramFiles\Diablo II")

that doesn't work, it says that the system cannot find the file specified..

Error: Unable to execute the external program.

The system cannot find the file specified.

however, with Run from the start menu, this works:

"C:\Program Files\Diablo II\Diablo II.exe"

the following also works with autoit:

Run("Notepad.exe", "C:\WINDOWS")

i tried moving the exe to the windows directory and it worked.. but it has to be in the Diablo II directory in program files in order to run properly..

so... the problem seems to lie in the Path... but what could it be?

also, i have not been able to get autoit to run a shortcut.. obviously this could solve my problem entirely, as i can just drop a shortcut into the windows directory..

also, i need to run the application with a commandline option: -w

i'd be greatful for any help you could give me

thank you,

brad

Share this post


Link to post
Share on other sites



Hey bradvexille, I think all you need to do is:

Run( "C:\Program Files\Diablo II\Diablo II.exe -w" )

and that's it

To run a shortcut you could do:

Run( "cmd /c start c:\documents and settings\user\desktop\shortcut.lnk" )

I'm pretty sure, you may want to hide the window uh, @SW_HIDE or something like that.

Share this post


Link to post
Share on other sites

try:

Run("C:\ProgramFiles\Diablo II\Diablo II.exe")

or

Run("C:\ProgramFiles\Diablo II\Diablo II.exe","C:\ProgramFiles\Diablo II")

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

thank you all for the very prompt replies, everything works smoothly now :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