Jump to content

Path Environment


 Share

Recommended Posts

I have an application or.exe in directory r:\or.exe

The dll's for this application are in r:\main\dk

(I can start this or.exe if I copy the dll's from r:\main\dk to r:\)

Why does it not start when I use one of those scripts?

EnvSet("PATH","%PATH%;r:\main\dk")

Run("r:\or.exe", "r:\")

or

EnvSet("PATH","r:\main\dk")

Run("r:\or.exe", "r:\")

Somebody can help me?

TNX

Link to comment
Share on other sites

Why does it not start when I use one of those scripts?

EnvSet("PATH","%PATH%;r:\main\dk")

Run("r:\or.exe", "r:\")

FYI, To expand your path you can do it this way

$path = EnvGet("PATH")
If StringRight($path, 1) <> ";" Then
    $path &= ";"
EndIf
EnvSet("PATH",  $path & "r:\main\dk")
MsgBox(0, "", EnvGet("PATH"))

I would not use this only for one Run function as Joon's answer does it easiest.

;)

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