Page 1 of 1

Howto manage "Modify", (Add or remove programs)

Posted: Wed May 25, 2011 6:59 am
by QooScho
Hello,
my installer installs a couple of files and also the apache webserver service and mysql service.
Normal installation works fine. After installation apache service and mysql service starts automatically.
Uninstall also works fine. All files and services are removed.

Now I want that user can choose parts to uninstall. I tried this with the Maintenance dialog and here "Modify" Add or remove programs
After starting the setup.exe second time the maintenance dialog appears. Then I click on Modify (Add or remove programs)
The component tree dialog appears. I deselect the Apache service.

But now it seems that all other stuff, programs and files will be installed again? This makes sense for me, because this programs run fine.
And if I want to install MySQL service over a running existing service this does not work.

And, How is the Apache service uninstalled? Does the wizard recognize this automatically?
In my script for the "Uninstall" I use a variable
if Variable REMOVE Equals TRUE

But if clicked on Modifiy the REMOVE variable will not set.

So, do I need the same things for MODIFY?

thanks a lot
regards
Hansjoerg

Re: Howto manage "Modify", (Add or remove programs)

Posted: Wed May 25, 2011 9:37 am
by giaviv
Dear Hansjoerg,

The best way to go about this is to create a desktop shortcut (or anywhere else) that manually uninstalls Apache.
For example if you have that MSI's product code, make the shortcut call msiexec {PRODUCT-CODE} REMOVE=ALL.
Let me know if that's an option for you.

Re: Howto manage "Modify", (Add or remove programs)

Posted: Wed May 25, 2011 10:37 am
by QooScho
Dear Aviv,
I do not understand exact.
I have no MSI product code for apache
Apache files are installed manually with FILES command and service is also installed manually.

regards
Hansjoerg

Re: Howto manage "Modify", (Add or remove programs)

Posted: Wed May 25, 2011 5:59 pm
by giaviv
Oh I see, my bad - sorry.

What happens is your installer uninstalls everything and reinstalls just the selected components - it does not know what you deselected or add, it just installs whatever is selected.

Re: Howto manage "Modify", (Add or remove programs)

Posted: Thu May 26, 2011 11:30 pm
by QooScho
Dear Aviv,

<<What happens is your installer uninstalls everything and reinstalls just the selected components >>

So, this means that the variable "REMOVE" is also set, although a Uninstall is not selected and instead a "Modifiy"?
This means at the end, same behavior for MODIFY AND REMOVE for the uninstalling part?

regards
Hansjoerg

Re: Howto manage "Modify", (Add or remove programs)

Posted: Fri May 27, 2011 5:10 am
by giaviv
The behavior is similar, but its not because the REMOVE is set to TRUE. Its just the way that the InstallAware engine works..