bobheart Posted June 23, 2004 Posted June 23, 2004 This runs ?@ECHO OFF :START START Firefox.exe And this won't ? Run("Firefox.exe", "", @SW_MAXIMIZE)
CyberSlug Posted June 23, 2004 Posted June 23, 2004 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!
bobheart Posted June 23, 2004 Author Posted June 23, 2004 Yes but why can a dos bat file run it with just the name and autoit needs the full path ?
pekster Posted June 23, 2004 Posted June 23, 2004 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.
bobheart Posted June 23, 2004 Author Posted June 23, 2004 Bat file is running from my documents folder and the Run(@Comspec & " /c Firefox.exe") does not work .
pekster Posted June 23, 2004 Posted June 23, 2004 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.
sugi Posted June 24, 2004 Posted June 24, 2004 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.
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