Add Remove Logic

Got a problem you cannot solve? Try here.
Post Reply
tj
Posts: 44
Joined: Tue Nov 04, 2008 9:38 am
Location: Atlanta, GA

Add Remove Logic

Post by tj »

I have some config files that my setup needs to create on the initial install only. To accomplish this I added some registry values to retain the previous installed state of each feature, allowing me to skip the creation of the config files for an add/remove action even though the selected component state is TRUE. However, in doing so, I noticed that if I don't add the Windows Installer actions during an add/remove --EVEN FOR ALREADY INSTALLED FILES-- then Windows Installer identifies this as an uninstall for that feature and removes the files.

This led me to wonder if, during an add/remove, files get re-installed even if they are already there. To test this, I used my instance of Install Aware 8. I went through add/remove programs to enter the maintenance mode of the IA8 install. I selected the radio button for add/remove but I didn't change a thing in the component tree. To my surprise, setup went through what appeared to be a re-install of the complete package. I even had to rerun my license .exe after this process. To me, this seems more like a repair action.

I'm hoping that Windows Installer checks versions and doesn't overwrite a currently installed and running Windows Service. I expected the component selections to be remembered between add/remove actions such that adding a single component would truly only add the newly selected component files.

Can someone help me understand what I am experiencing? It looks like we need to put non-Windows Installer actions in a separate conditional section and trust that the Windows Installer will not overwrite files that do not need to be overwritten?
CandiceJones
Posts: 904
Joined: Thu Dec 22, 2005 7:03 pm
Contact:

Post by CandiceJones »

This is covered in full detail in our MSIcode whitepaper. Please read this whitepaper and post back here if you have further questions.
Candice Jones
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
tj
Posts: 44
Joined: Tue Nov 04, 2008 9:38 am
Location: Atlanta, GA

Post by tj »

Just to follow up from my original post...

I ended up identifying that stopping the service during the update and restarting the servic after the update prevented the need for the reboot. Apparently, that was the trigger for Windows Installer to flag the reboot.

Thus, at the beginning of my update logic, I use the Run Program scritp to call "sc" to stop all of the application services, apply the update and then restart the services again manually at the end of the udpate.

Hope this helps someone else.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Any reason you did not use Control Service?
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
tj
Posts: 44
Joined: Tue Nov 04, 2008 9:38 am
Location: Atlanta, GA

Post by tj »

I started using Control Service but I needed to be able to start and stop the services without the install/uninstall trigger. Thus, I have an include script for starting and one for stopping that allows me to start the services in order to do some configuration/testing/analysis during the setup and/or updates.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Makes sense.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Post Reply