Jump to content

Run() issue.


Go to solution Solved by Jos,

Recommended Posts

hey everyone, thanks for stopping by:)

sooo I have an issue, I'm writing an auto-starter for myself, when I start the script, I want it to run a few programs on its own.

I'm pretty much done, except for one part. each of the programs has a .config file in their folder, the problem is, when I place the script in a folder and if the programs are in a pile of subfolders, there's an error. autoit runs it and returns a PID, but the app stops with an error that it couldnt locate the .config file. when I put the script in the same folder, it runs with no problems. I tried shellexecute, I tried @workingdir &"location", the result was the same. any ideas?

Link to comment
Share on other sites

  • Developers

Have you defined the proper workdir on the Run() command?

Show an example of what you have tried that isn't working with one of your programs.

Jos

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

thanks for replying Jos!

well this is just a piece of a function I'm writing, I tried with one program and it didnt really work so I havent finished it:

func startup()
    Run("Store\Store.exe")
EndFunc
func startup()
    Run(@workingdir &"\Store\Store.exe")
EndFunc
func startup()
    Run(@scriptdir &"\Store\Store.exe")
EndFunc

all of them started the program, but then the program returned an error that it couldnt find the .config file in the directory of the script (!), not the directory it was in. 

Edited by Tioner
Link to comment
Share on other sites

  • Developers
  • Solution

The workdir parameter is the second parameter so should look something like this

Run("Store\Store.exe","Store")

Jos





			
		

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...