Jump to content

Help with run


Clay
 Share

Recommended Posts

Can someone please let me know why the "Run" command does not work properly if I am the executable that I am running is not in the same directory as the script thats calling the function.

More Info:

I have expanded a package and want to run the setup.exe within the folder. I use the following in my code but it does not work and I get the following message

"Please go to control panel to configure and install components"

run(@ScriptDir & "\Package\setup.exe")

but if I have the expanded file in the same directory as my script and use the following it works fine

run("setup.exe")

Should I be able to decide where and which executable I want to run?

Help please

Link to comment
Share on other sites

Try Run(@ScriptDir & "\Package\setup.exe", @ScriptDir & "\Package").

A bit more extended ;)

run("setup.exe") This works because the script is in the same working dir as setup.exe

Try Run(@ScriptDir & "\Package\setup.exe", @ScriptDir & "\Package") here you set the working dir.

I think for some programs the correct working dir is needed for others not.

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