[Incident]: Some users report they are unable to access the case portal. Please see this community notice for more information.

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

How to access the setup.exe directory in an InstallScript in a Suite/Advanced UI project?


My objectives:

I am trying to create an installation setup for a program I wrote. The complete installer must contain:

  1. the installer for my program (created in a Simple MSI Project)
  2. the driver installers (Third party Executables)
  3. some configuration files, that will be copied under AppData. The idea with the configuration file is that our customers will be able to change these files and deliver "updated" version of the installer to their customers (same binaries, new configuration files) by themselves, without me or someone else opening the InstallShield project and updating the installer or creating a patch -> less work

The idea:

I therefore created a Suite/Advanced UI Installation project with 1. and 2. as Packages and I want to handle 3. with an InstallScript Action, that would be triggered during installation of 1.. The InstallScript just need to search for a "Configurations" directory in the directory of the setup.exe and copy all of its content in AppData.

I found this post How-to-find-current-directory-where-the-install-file-resides and what I need seems to be either SRCDIR or PACKAGE_LOCATION.

The Problem:

I also found in Working with an Action that Runs InstallScript Code in a Suite/Advanced UI Installation that InstallScript run-time path variables (PROGRAMFILES, WINDIR, etc.) are not available for a Suite Project, therefore I also tried to work with the properties I found in Advanced UI and Suite/Advanced UI Property Reference .

What I tried:


TextSubGetValue("<PROGRAMFILES>", svValue, FALSE, FALSE);
SuiteLogInfo("<PROGRAMFILES>: %s", svValue);
TextSubGetValue("<SRCDIR>", svValue, FALSE, FALSE);
SuiteLogInfo("<SRCDIR>: %s", svValue);
TextSubGetValue("<PACKAGE_LOCATION>", svValue, FALSE, FALSE);
SuiteLogInfo("<PACKAGE_LOCATION>: %s", svValue);
SuiteLogInfo("GetCurrentDir(): %s", svValue);
SuiteGetProperty("SETUPEXEDIR", svValue);
SuiteLogInfo("SETUPEXEDIR: %s", svValue);


What I got:

When I read the Logfile I get the following:

  • I cannot get the Information I want from TextSubGetValue(),
  • the SETUPEXEDIR property from SuiteGetProperty() gives me a temporary Directory back, also not what I want and
  • I actually get the correct Directory from GetCurrentDir() but the GetCurrentDir documentation says I should rather use SRCDIR. 


How can I safely get the Directory of the Setup.exe in a Suite / Advanced UI Project? Is there a better solution for my Problems?

Many thanks,


Labels (1)
0 Kudos
0 Replies