Windows Installer
(1)
CustomCheckA
(1)
ProductID
(1)
SetProperty
(1)
CHECKBOXA
(1)
Directory
(1)
TARGETDIR
(1)
CHECKBOX
(1)

VS2008 setup project installation upgrade doesn't remember CHECKBO

Asked By mjmeans
11-Nov-09 12:02 AM
Okay, here is the scenario. I have a setup project with the Checkboxes (A)
dialog and 3 check boxes are enabled. And RemovePreviousVersions is set to
true. I build the installer and run it, setting a check mark in CHECKBOXA1. I
make a change to the application. I change the installer version number and
let VS2008 update the product code when it prompts me. I build the installer
and run it. it is now doing an upgrade. When it gets to the Checkboxes (A)
dialog, it does not remember the original settings.

So I know that the older installs product key can be saved in the registry
during install and retrieved by the new installer using a registry launch
condition that retrieves a saved ProductID and places it in Property PIDKEY.
Which I use with no problems. So I assume that the same can be done with the
CHECKBOXA1 property of the Checkboxes (A) dialog, but that does not work.

In addition, when I do a repair installation, it appears that all three
CHECKBOX properties are cleared and the reinstall happens WITHOUT doing the
actions that the checkbox properties are used to control. i.e. when doing
add/remove ... change... repair, it does the repair as if no check boxes were
originally checked regardless of how many were actually checked.

I do not know why, but yes, you are right.

Wilson, Phil replied to mjmeans
12-Nov-09 04:47 PM
I do not know why, but yes, you are right. If you were to do something to set
TARGETDIR to some directory then internally the generated MSI file does not
set it. However for the checkboxes there are unconditional internal custom
actions to clear them. So you cannot save them in the registry, search for
them and restore them on a repair or upgrade. I know of no other solution
except to edit the built MSI file to delete all calls to the
CustomCheckA_SetProperty_CHECKBOX3 307 CHECKBOXA<n> custom actions.
--
Phil Wilson
The Definitive Guide to Windows Installer
http://www.apress.com/book/view/1590592972
Post Question To EggHeadCafe