stockboy Posted December 7, 2006 Posted December 7, 2006 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
lod3n Posted December 7, 2006 Posted December 7, 2006 When you use your DLL, why not include the full path? Meaning, DllCall("R:\main\dk\dllname.dll"), then you don't need the EnvSet. [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]
Joon Posted December 7, 2006 Posted December 7, 2006 (edited) Try this way without Path update Run("r:\or.exe","r:\main\dk") Edited December 7, 2006 by Joon
stockboy Posted December 8, 2006 Author Posted December 8, 2006 lod3n & Joon Thanks a lot, very useful, my 'search' is over ;o)
MHz Posted December 8, 2006 Posted December 8, 2006 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.
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