Jump to content
Sign in to follow this  
stockboy

Path Environment

Recommended Posts

stockboy

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

Share this post


Link to post
Share on other sites
Joon

Try this way without Path update

Run("r:\or.exe","r:\main\dk")
Edited by Joon

Share this post


Link to post
Share on other sites
stockboy

lod3n & Joon

Thanks a lot, very useful, my 'search' is over ;o)

Share this post


Link to post
Share on other sites
MHz

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.

;)

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.