4

Is there a possibility to add directory (with sub directories) to SupportFiles section in installshield. I have dynamically created content (list of files changes constantly) that I use to support my installation.

Is there any other method to add dynamically whole directory to installation package. I need files from this directory only during installation process. At the end of the installation I want IS to remove these files automatically ?

Darqer
  • 2,847
  • 9
  • 45
  • 65
  • 1
    The use of excessive amounts of support files for an installation is generally a sign of a bad deployment design. Perhaps you are installing a Java product? What type of files are these? – Stein Åsmul Feb 02 '14 at 12:23

2 Answers2

5

The ISSetupFile table ( which drives the Support Files pattern ) only supports extracting files to a single directory. There is no way in the UI to tell it to be dynamic although you could have a build automation step that reflects the contents of a directory and wires it up to the table using the automation interface. This still couldn't do sub directories though.

What you probably want to do is creating a self-extracting zip of the files you need as part of your build and add that EXE to Support Files. Then write custom actions that call the EXE to extract the payload to Support Files and another CA to clean it up. Look for the custom action ISSetupFilesExtract and ISSetupFilesCleanup to figure out the best way to do this.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • 1
    This is the solution I figured I would need to use. Thanks for confirming that suspicion! – BuvinJ Apr 17 '15 at 12:24
  • FWIW, WiX C#/DTF custom actions have much better support for nested support files that exist during the execution of the custom action and get cleaned up when the CA exits. – Christopher Painter Apr 17 '15 at 12:28
  • Thanks, Chris. You can also add directories to "Advanced FIles", e.g. as in "Disk 1", but I couldn't find them installed anywhere or figure out how to access them in a CA, so that did me no good. Also, if you just use an InstallScript project instead of an MSI, it far easier to work with Support files in every way. The trouble is that other aspects of the installer become more difficult to customize and/or they just differ in various ways from what you come to expect when using the standard MSI most of the time, as I have. – BuvinJ Apr 20 '15 at 12:31
  • I did InstallScript from 1996-2003. It took me 6 months to drink the kool-aid but I've done (basic) MSI / WiX MSI ever since. I'm OK with the occasional InstallScript CA in the MSI but I don't do IntallScript or InstallScript MSI anymore. – Christopher Painter Apr 20 '15 at 12:51
1

Although I'm late to the party: @BuvinJ mentioned in a comment that you can add directories to "Advanced Files" under "Disk1." In this case, they do appear in the temporary directory (support directory), eg. SUPPORTDIR\Disk1

SUPPORTDIR is a temporary location where the installer dumps files, and cleans them up afterward. An example is C:\Users\<your user name>\AppData\Local\Temp\2\{F6B9B2D6-2A5A-4146-9297-E80A199CB0CB}.

This could be a quicker/cheaper/faster solution to writing custom actions and/or packaging up files by hand in, say, a self-extracting zip file.

ashes999
  • 9,925
  • 16
  • 73
  • 124