stockboy Posted December 7, 2006 Share 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 Link to comment Share on other sites More sharing options...
lod3n Posted December 7, 2006 Share 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] Link to comment Share on other sites More sharing options...
Joon Posted December 7, 2006 Share Posted December 7, 2006 (edited) Try this way without Path update Run("r:\or.exe","r:\main\dk") Edited December 7, 2006 by Joon Link to comment Share on other sites More sharing options...
stockboy Posted December 8, 2006 Author Share Posted December 8, 2006 lod3n & Joon Thanks a lot, very useful, my 'search' is over ;o) Link to comment Share on other sites More sharing options...
MHz Posted December 8, 2006 Share 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. Link to comment Share on other sites More sharing options...
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