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

Source Folder

Hi,

Is there a property within the installshield that stores the folder from where the setup.exe or msi is run from i.e. C:\installproduct\disk1 ?


Thanks
Labels (1)
0 Kudos

(4) Replies
abby27
Level 4

AmberTiger,
Use [SETUPEXEDIR] or [SRCDIR], built-in properties
0 Kudos
AmberTiger
Level 4

Hi Abby27,

I have tried the above and I can not seem to get it to work (returns blank) - I have put the resolve source action before my script - both run after Installfinalize. Is this correct?

Thanks
0 Kudos
abby27
Level 4

Plz check your log file for the the values of these properties. If they are indeed empty, here is more info.

The SETUPEXEDIR property contains the path to Setup.exe. For example, if the path to Setup.exe is C:\MySetups\MyApp\Setup.exe, the value of SETUPEXEDIR is C:\MySetups\MyApp.

There are two limitations to using SETUPEXEDIR:

* SETUPEXEDIR is set by Setup.exe. If the end user runs the .msi package directly, SETUPEXEDIR is not set. To account for this, you could have a dual implementation in your installation—one that uses SETUPEXEDIR and one that uses SOURCEDIR. You could test for the existence of SETUPEXEDIR and, if it does not exist, you could conditionally use your SOURCEDIR implementation.
* SETUPEXEDIR might not be set at uninstallation. If the end user triggers the uninstallation by running Setup.exe, SETUPEXEDIR is set. If they run the uninstallation from Add or Remove Programs, SETUPEXEDIR is not set.

Note that in an uncompressed installation, SOURCEDIR and SETUPEXEDIR have the same value.

SOURCEDIR

This property stores the root directory where all the source files are located.

In the following three scenarios involving build settings, SOURCEDIR should be referred to during installation only. In these circumstances, the setup image runs from a temporary location that is removed following installation.

* Custom builds when the Include Setup.exe option is set to Yes and the Compress Media option is set to Yes
* SingleImage builds when the Include Setup.exe option is set to Yes and the Copy Media to Target Machine option is set to No
* WebDeployment builds when the Copy Media to Target Machine option is set to No

SETUPEXEDIR is an alternative to the directory identifier SOURCEDIR. A potential problem with using SOURCEDIR is that it points to the location of the running .msi package. In the case of a compressed installation, the .msi package is streamed to a temporary location and run from there. Because of this, the value of SOURCEDIR will be some temporary location on the end user’s machine, which might not be the value you want.
0 Kudos
AmberTiger
Level 4

Thanks Abby27 - all working now

Cheers.
0 Kudos