oladuda
Posts: 1
Joined: Wed Jan 19, 2005 5:01 pm

Pre-install condition

Hello!
I have the following installation packages for my project:
1. Framework, with some basic environment
2. a set of Plugins, each dependent on the framework.
And the situation is, that I would like to:
1. prevent Plugins from installing if Framework is not present - this can be easily done via Custom Action
2. Set install dir for each Plugin as a subdir of Framework install dir. Currently I'm doing this by passing Framework install dir as environment variable, and by setting the TARGETDIR in Plugins to [%FRAMEWORK]\Plugins\MyPlugin...

But the problem is when I'm trying to install a plugin on machine on which there is no Framework present, so %FRAMEWORK variable is empty, and TARGETDIR has the value "\Plugins\MyPlugin...", which in turn makes instaler to show a message "Cannot access resource \Plugins...", and stop installation.

My question is: is it possible to perform Custom Action BEFORE processing of TARGETDIR and other MSI properties?
Or how can I make my install package reacting properly to missing Framework?

Best regards and thanks in advance for help
Alexandra Duda
Alexandra Duda
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

1. It is not posible to perform custom actions before setting the TARGETDIR because TARGETDIR is set by a custom action scheduled both in InstallUISequence and InstallExecuteSequence( but executed only once - in InstallUISequence if full UI is used ).

But if in the packages that install the plugins is not displayed a dialog for setting the folder to install into (Select Location Dialog) then TARGETDIR can be set by a custom action scheduled in the InstallExecute sequence (after a standard action from the "Before Initialization" group) - in case the framework is installed and it must be set the directory for plugins.

2. Application Search is the perfect solution for this kind of needs. It will be available in AdvInst 2.4

Cata
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”