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

SUPPORTDIR question. How I can use it?

Hi, all.
Please, help me to understand how it works.
Accordingly to documentation:

Support files are files that are available on the target system only during your product’s installation process. Support files are copied to a temporary directory on the target system when installation begins. The support files are deleted when the installation is complete. The support directory is a dynamic file location and might be different on every target system and even on the same system for different installation instances.
In the Support Files view (in Basic MSI, InstallScript Object, and Suite projects) or the Support Files/Billboards view (in InstallScript projects and InstallScript MSI projects), you can add and remove files that you want to be available on the target system only during installation.

So, I added my files to project and...and nothing ! When I started my installation I did not see these files inside temporary directory...But when I started installation again and installation removed previous installation my "support files" files appeared in temporary folder.

Please, how I can see my files when I do my installation steps ? (not uninstall steps)
Labels (1)
0 Kudos
(6) Replies
Hazard
Level 4

I checked it again. When my installation started, IS2012 created SUPPORTDIR and 2 more folders. And one of this folder stored my files. The question is, why these files located not in the SUPPORTDIR folder?

Please, check my picture. In the message box I shown the SUPPORTDIR location. And in the file manager I highlighted the real folder with my files.
0 Kudos
Hazard
Level 4

The problem was in my script.

Before, I used SUPPORTDIR like this:

szPath = SUPPORTDIR + "\\CheckUserCredential.dll";

This is wrong way. It will be like this:

MsiGetProperty(hMSI, "SUPPORTDIR", szSupportDir, nvCount2);
zPath = szSupportDir + "\\CheckUserCredential.dll";

Accordingly to the documentation:

Project: Note that the value of the Windows Installer property SUPPORTDIR is not the same as the value of the InstallScript system variable SUPPORTDIR.
0 Kudos
KEiGHT
Level 6

The Support Files view allows you to add files that are installed to the target system for use only during the installation process. These files are automatically removed from the target system when the installation is complete.
0 Kudos
ISViper
Level 3

@Hazard: very nice post, you solve my problem and save my day. Thanks very much.
0 Kudos
Raghvendra
Level 4

Thanks Hazard it's very helpfull
0 Kudos
SimonG
Level 5

I would also recommend that when you concatenate paths together you use the ^ operator instead of the + operator. This saves you the hassle of working out whether slashes need to be put between parts of the path.
http://helpnet.installshield.com/installshield16helplib/mergedProjects/installshield16langref/LangrefAppend_to_path_.htm
zPath = szSupportDir ^ "CheckUserCredential.dll";
0 Kudos