cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
BrHartmann
Level 7

need script to read exe folder, not necessarily working folder

I was using GetCurrentDir(), and that seemed to work fine... but apparently that is only the case if you invoke the setup exe with your active working directory equal to the folder where the exe is. This method breaks down if a user sets up a batch file / script in some other folder which calls the setup exe without changing the working / active folder first.

This is for a pure Installscript project, so if there is a Windows Installer variable that would have helped here, I can't use it.
Labels (1)
0 Kudos
(2) Replies
BrHartmann
Level 7

I should clarify one more thing - I'm generating a single (self-extracting) exe, and as mentioned in some other threads, SCRDIR will not give me the correct folder (I had tried this earlier, before arriving at GetCurrentDir() ).
0 Kudos
BrHartmann
Level 7

Issue has been resolved: I found another thread which referenced using PACKAGE_LOCATION in a pure Installscript project, and based on some quick testing, this will work fine (I just need to filter out the filename portion).

For reference, here's the thread I was referring to:
http://community.flexerasoftware.com/showthread.php?t=194020
0 Kudos