Sign in to follow this  
Followers 0
bobheart

Why this and not that ?

7 posts in this topic

This runs ?

@ECHO OFF
:START
START Firefox.exe

And this won't ?

Run("Firefox.exe", "", @SW_MAXIMIZE)

Share this post


Link to post
Share on other sites



What is the current directory?

Either try

Run("C:\Program Files\FireFoxFolder\Firefox.exe", "", @SW_MAXIMIZE)

or try

FileChangeDir("C:\Program Files\FireFoxFolder")

Run("Firefox.exe", "", @SW_MAXIMIZE)

Adjust path as needed; use @ProgramFilesDir if you want...


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

Yes but why can a dos bat file run it with just the name and autoit needs the full path ?

Share this post


Link to post
Share on other sites

Yes but why can a dos bat file run it with just the name and autoit needs the full path ?

My guess is that the working directory from your script is the directory that the script was run from. I'd further guess that a Run(@Comspec & " /c Firefox.exe") would work, since it did from your command prompt before.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

Bat file is running from my documents folder and the Run(@Comspec & " /c Firefox.exe") does not work .

Share this post


Link to post
Share on other sites

Bat  file is running from my documents folder and the Run(@Comspec & " /c Firefox.exe") does not work .

Then if you run your call from the directory of the my documents folder, you should have no problems.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

I guess there's a different reason for it. Windows saves the paths for some applications like iexplore.exe in the registry (HKLM\SOftware\Microsoft\Windows\Current Version\App Paths). If the program can be found there, it can simply be run using cmd /c start iexplore.exe. However if you're trying to run the program without using start (e.g. cmd /c iexplore.exe) it cannot find it because it's not within its path.

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