Windows installer questions (custom actions and GUIDs)


Viviana Vc

Hi all,

I have read the articles from the written by
Stefan Krueger and Rob Mensching and I have some questions:

1) There are 2 types of custom actions: immediate custom actions and
deferred custom actions. In one article
( is said
- "Immediate execution custom actions should not modify the target
system because they cannot be rolled back."
- "deferred execution customs actions cannot directly access installer
properties, and they cannot set the value of any property."
In my case when starting the uninstalling process the first thing I have
to do is to show the user a 2 radio-buttons dialog and in case the user
choses A I have to run a.exe and in case the user choses B I have to run
b.exe. As these might change the target system taking in account the
notes above I will have to make these deferred custom actions.
The problems:
- being a "deferred custom actions" means I can not set any property in
the installer but I need the return value of the exe b/c depending on
that return value I have to do smth further. If I can't set a property
how can I go further on the right track?
- "deferred custom actions" doesn't mean they will be executed at the
end of uninstallation? If yes, what can I do to run them as the second
step of uninstalling, the first stept being the 2 radio-button dialog
being shown to the user?

In other words I have to do secventialy the follwoing when UNinstalling:
- show to the user a 2 radio-button dialog
- run some exes depending on the above selection
- continue by showing to the user some UI dialogs
- uninstall completely the binaries

2) I read the article "Component, package, product and upgrade codes in
Windows Installer" by Stefan Krueger and I have some questions.
a) "if you change the name of an application file, you must also change
its component ID". Why do I have to change the ID of the component? What
would be the behaviour if I wouldn't change it?
b) "The important part is the "v" in the reinstall mode settings. It
forces the use of the new msi file instead of the cached copy." but the
sample says "If you try to install two msi packages with different
package codes, but with the same product code" so for sure not the
cached copy will be used as that one has a diff package code correct? So
the 'v' mode in this sample is not really needed correct?
c) "To overwrite the existing product with a newer version ... msiexec
/i Yourapp.msi REINSTALLMODE=vomus REINSTALL=ALL". What happens if the
new msi contains for the installed feature a new component? Will this be
also installed? What if it misses one of the old components? Will be
that one removed?
d) "The following changes in your setup project require that you change
the product code:"
- "The component code of an existing component has changed". As above
was written that a component code has to be changed if the resource it
contains got changed means that actually: if I change a registry
resource in an existing component I have to change the component code
which means I also have to change the product code correct? Why is that?
- "A component has been removed from an existing feature". Let's say my
product consists of 10 exe files so I created 10 components for each of
that files. Now one file is not needed in a newer vers of my product so
I remove the component and this means I have to change the product code?
Why is that?
- If I add a new component to an existing feature do I have to change
the product code?
e) My problem is that from above seems that the product code might
change even for what I would call "small changes" (a registry flag
changed) and that means the new version of my product can be then
installed on the same machine with the old version and this is for sure
not what I would like. If I change the product code how could I control
so that my product is installed only once on one machine?

I know above are a lot of questions but I know I'll start on the wrong
foot if I won't understand these.
Thanks in advance,


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question