cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Manuel_K
Level 4

[BasicMSI] Get installation source path in InstallScript

Hello,

I've only done BasicMSI setups in the past but now I'm trying to write a few lines of InstallScript to run it as a CustomAction during installation.

This script has to copy additional files from our installation DVD which are added *after* building the installer. They are allways placed in a fixed folder next to setup.exe/product.msi

I've tried several path constants like "SRCDIR" and "SourceDir", but they only resolve to a path within the %TEMP% folder of the computer and not to the actual DVD drive where the installation was launched from.
Using a simple EXE call before as the custom action and passed [SOURCEDIR] as a parameter and this worked fine so far. But why do I get different paths within the InstallScript?

- InstallShield 2010 Premier
- BasicMSI project
Labels (1)
0 Kudos

(3) Replies
Not applicable

You can try to get property SETUPEXEDIR through MsiGetProperty.
0 Kudos
MSIYER
Level 8

SourceDir will refer to %Temp% folder incase you have a setup.exe that extracts the installation files to %Temp% before performing the actual install.
Installshield's setup.exe does that if you create a compressed setup.

This is correct in one sense. The msi files are extracted to the %Temp% folder, so the SourceDir property in the eyes of msi is %Temp%.

If you can get rid of the setup.exe, you can use the SourceDir property without any trouble. If you cannot another option would be to stream all the files that you need as SUPPORT files and then use SUPPORTDIR property.
This increases the install time as now there are more files to extract. This increase in time would be excruciating if the Support files you included are huge.

BEST OPTION THOUGH would be to use SETUPEXEDIR. But it has some things to take care of. Read this:
http://kb.flexerasoftware.com/doc/Helpnet/installshield12helplib/SETUPEXEDIR.htm
0 Kudos
MSIYER
Level 8

Forgot to mention:
In an uncompressed setup(separate setup.exe and msi):
1)SourceDir and SETUPEXEDIR will have the same value
2)If user runs msi directly, SETUPEXEDIR will not be set.

Thanks
0 Kudos