PDA

View Full Version : Install Exe's Application Path



hazosTAS
07-11-2008, 09:48 AM
Is there a way to get the install executables application path? By install executable I mean the install that was created. And by application path I mean where the executable resides. For example, if i have my setup.exe in C:\Test, the application path would be C:\Test. If i were to move the file to D:\Folder1\Folder2\Test, the application path would be D:\Folder1\Folder2\Test. Let me know if this is possible. Thanks in advance.

RobertDickau
07-11-2008, 09:50 AM
What kind of project? For MSI, SETUPEXEDIR might be of use, and for InstallScript, see PACKAGE_LOCATION.

hazosTAS
07-11-2008, 09:58 AM
I am using an Installscript type. I tried PACKAGE_LOCATION, and it returned an empty string. This is what i tried as a test.

function OnBegin()
begin
MessageBox(PACKAGE_LOCATION, WARNING);
end;

hazosTAS
07-11-2008, 09:59 AM
I got it to work with SRCDIR, thanks for the SETUPEXEDIR tip!