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

release dependent support files

Is it possible to make a support file release dependent? I'm working with several releases and want to include certain support files into certain releases only.

I want to create a full release that restores a database. The client release doesn't need this restore functionality, so it doesn't need the database as a support file.

For components and redistributable this works perfect by using release flags, but I don't see any possibility to do this for support files.

Thanks,
Kristof
Labels (1)
0 Kudos
(14) Replies
Reureu
Level 10

Hi,

Gosh! I just realized that this is exactly what I need.
I added some support files as "Advanced Files" yesterday, and I realized that they needed to be different for each release I have in my Basic MSI project.

I don't see any Release Flag associated with these support files.

Any idea?

Regards
0 Kudos
DebbieL
Level 17

I don't think there is any support for adding release flags to support files. However, the automation interface lets you add and delete support files to your project. Perhaps you could somehow automate adding and deleting the required files before your builds. For more information, see AddSetupFile, DeleteSetupFile, ISWiSetupFile in the help.
0 Kudos
Kristof
Level 3

Thank you for your reply Debbie.

Isn't there a workaround to achieve the same instead of using the automation interface? For now, I've added the backup file as a component to my Basic MSI project, using release flags to make it release dependent.

However, the file still exists on my system after the installation. I tried to set the Destination to SUPPORTDIR, but that was to optimistic 🙂 Is there any possibility to remove the file after the installation?

Thanks,
Kristof
0 Kudos
DebbieL
Level 17

Perhaps you could try removing the backup file through a custom action. Note that the backup file should not be the key file of its component. (If it were the key file, repair would probably start at some point, and Windows Installer would try to replace that file.)

btw, 1-L1NXG is the tracking code for this feature request (ability to add release flags to support files).
0 Kudos
Kristof
Level 3

Can you give me some feedback on this custom action? Suppose I'm using an InstallScript for my custom action, what command should I use to delete the file. And which sequence should I select to remove the file at the end of the setup?

Thanks,
Kristof
0 Kudos
DebbieL
Level 17

Well, the more I think about your scenario, the more I think that using the component for your backup file could be problematic in the future. It could cause problems for maintenance, and it might make it tough to create upgrades. If you were using the automation interface, you could add and delete the file as a support file to the appropriate releases before building. That's the only safe way I can think of to resolve the issue.
0 Kudos
ZygoCorp
Level 6

I don't understand what this "automation interface" is thatyou all are referring to, but...

I have an InstallScript project. Am I understanding that there is no way to have one set of Support Files for 1 release and a second set of Support Files for another? (for example: a 32 bit release that has all of the 32bit components of files in it and a 64 bit release that has all of the 64 bit components, and both contain the components that don't care about the platform>
0 Kudos
scottd72
Level 7

I'm a latecomer to this thread, but I have to agree that adding the ability to use release flags for support files would be a great addition to the software. I could sure use this feature in my project files. But until then, all my releases install all of the support files to the temp folder no matter if they're needed or not, and there's nothing good I can do about it.
0 Kudos
BrHartmann
Level 7

Since we didn't get release flags for support files yet in IS 2012 (if this is planned for SP1, PLEASE let us know - I can avoid setting up a bunch of workarounds and just wait for the release) ...

Debbie, you mentioned using the automation interface to add/delete support files per release. To clarify, do you mean the Prebuild and Postbuild Commands under the Events tab for a Release? Also, will this work in a pure Installscript project, or just in basic MSI / IS MSI ? If so, could someone please provide sample code showing the adding/deleting of 2 files to support files in this way.

Thanks!
0 Kudos
Reureu
Level 10

If your release-dependent support files are not too big, you can add both to your project. both files will then be temporarily unpacked to the temp folder while the setup is running.
Then implement a simple mechanism to use one or the other at runtime, depending on the ISReleaseFlags property.

Obviously, this works fine for MSI projects. We have done it and it works fine.
I don't know how to do that in a pure InstallScript project, but there must be a way!
0 Kudos
DebbieL
Level 17

BrHartmann,

The help library has some sample code snippets that may be useful. Here are links:

I recommend giving that a try.
0 Kudos
BrHartmann
Level 7

Thanks, Debbie, I'll look into your suggestions. The automation interface is not what I thought it was, and looks to be capable of supporting what I need to accomplish.

Reureu - to answer your question, I need to swap out sets of 100+ MB files, so it's not practical for us to include them all in every build. There are also some other much smaller support files where I'm using your method though.
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

If you're using a more recent version of InstallShield, and you just need to swap between similar files, you might also be able to do it with Path Variable Overrides. You can set one or more path variables to a different location for each release (see the Build tab in IS2011 or later), causing a different set of files to be pulled in to each release's build.
0 Kudos
BrHartmann
Level 7

Thanks for the tip Michael. Some of the files are similarly named, so this could work. For the files that only need to be in one release, I could create tiny dummy files of the same name for the other folders.
0 Kudos