cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JoelRaj
Level 3

Basic MSI: How to get the Install Setup path in the script

Hi,
I am just trying to get the installation folder path, where the setup.exe is run from, during installation. Tried SETUPEXEDIR & SRCDIR. But so far, unsuccessful.

SRCDIR gives the temp path where the MSI file is extracted.

The script using SETUPEXEDIR below gives an empty path.

Could anyone please help...

Thanks,

Raj.

Please find script below:
==================
#include "ifx.h"

STRING SETUPEXEDIR[MAX_PATH + 1];

function MyFunction(hMSI)

NUMBER nBuffer;


begin

nBuffer = MAX_PATH + 1;

MsiGetProperty(ISMSI_HANDLE, "SETUPEXEDIR", SETUPEXEDIR, nBuffer);

// for testing: display the variable's value

MessageBox("SETUPEXEDIR = " + SETUPEXEDIR, INFORMATION);

end;
Labels (1)
0 Kudos
(3) Replies
mcilis
Level 4

I think you should use: SourceDir
0 Kudos
JoelRaj
Level 3

SourceDir is the same as SRCDIR. It stores the SourceDir value.
0 Kudos
JoelRaj
Level 3

Resolved. The value of SETUPEXEDIR is present only during the early stages of the installation. Towards the end the the value is empty.
0 Kudos