cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Naveed
Level 6

Current Directry Path Issue (SETUPEXEDIR)

When I launch setup.exe, Session.Property("SETUPEXEDIR") gives the correct path of directory which contains setup.exe.However, when I launch MSI file, SETUPEXEDIR is empty?

SRCDIR returns empty string in both cases. I am using Basic MSI, InstallShield 2010.

Please help how I can get the current directory where setup file resides, while launching setup through MSI file?

Thanks,
Naveed
Labels (1)
0 Kudos
(1) Reply
Ajay_Ladsaria
Level 7

SETUPEXEDIR property is set on the command line to msiexec.exe by setup.exe when the install is run through the setup.exe. This is why this property is undefined when the install is run directly from the MSI file.

You may want to use the SourceDir property instead. This is a MSI property that is set by the ResolveSource action. So this means you can use the value of this property to determine the MSI location anytime after ResolveSource action. Note that by default InstallShield puts a condition on this action so that it is only run during a first-time install.

SourceDir Property
http://msdn.microsoft.com/en-us/library/aa371857(VS.85).aspx
0 Kudos