Condition on Component to run only on uninstallation
Hi,
I am trying to create a two Active Setups in my package. One active setup runs fine after installation. 2nd Active setup I want to run only at the time of uninstallation. I saw vbscabs posting in the forum in which he said that create a component & put condition that it only run at the time of uninstalltion so I put condition
Condition REMOVE="ALL"
I am trying to create a Reg key of active setup only at the time of uninstalltion but by putting the above condition I am not getting the key. Any suggestion.
Thanks
I am trying to create a two Active Setups in my package. One active setup runs fine after installation. 2nd Active setup I want to run only at the time of uninstallation. I saw vbscabs posting in the forum in which he said that create a component & put condition that it only run at the time of uninstalltion so I put condition
Condition REMOVE="ALL"
I am trying to create a Reg key of active setup only at the time of uninstalltion but by putting the above condition I am not getting the key. Any suggestion.
Thanks
0 Comments
[ + ] Show comments
Answers (9)
Please log in to answer
Posted by:
anonymous_9363
13 years ago
Posted by:
fiqa
13 years ago
Destination [INSTALLDIR]
Destination Permissions 0 Permission defined
Component Code {23DF6589-6D13-4287-9BF9-FGR48FES}
Shared Yes
Permanent No
Condition REMOVE="ALL"
Remote Installation Favour Local
Reevaluate Condition No
Never Overwrite No
64-Bit Component No
Disable Registry Reflection No
Multiple Package Shared No
Uninstall Superseded Componet No
Destination Permissions 0 Permission defined
Component Code {23DF6589-6D13-4287-9BF9-FGR48FES}
Shared Yes
Permanent No
Condition REMOVE="ALL"
Remote Installation Favour Local
Reevaluate Condition No
Never Overwrite No
64-Bit Component No
Disable Registry Reflection No
Multiple Package Shared No
Uninstall Superseded Componet No
Posted by:
fiqa
13 years ago
Posted by:
jmcfadyen
13 years ago
Posted by:
Matias M Andersen
13 years ago
During Uninstall, all unique components and the data within the component are being removed. To make sure the component aren't flaged for removal during an uninstall, you have to set its attribute "msidbComponentAttributesPermanent" or rather its bits value which is "16" in the "Attributes" column in the "Component" table. Tho be aware that this will leave the component permanently on the client machines.
/Matias
/Matias
Posted by:
pjgeutjens
13 years ago
Problem arises I'm afraid if you only want to put the component in place when uninstalling the product... think about it: you'll be putting an orphaned component on the machine while uninstalling its 'parent' application.
If you're not able to put the necessary stuff into place using a custom action, I'm afraid you'll have to install a new MSI when uninstalling your original application. I don't even know if the WriteRegistry and CreateFiles actions run during uninstall..
PJ
If you're not able to put the necessary stuff into place using a custom action, I'm afraid you'll have to install a new MSI when uninstalling your original application. I don't even know if the WriteRegistry and CreateFiles actions run during uninstall..
PJ
Posted by:
jmcfadyen
13 years ago
Posted by:
Arminius
13 years ago
This is an unusual request - doing an active *Setup* after uninstallation. What do you hope to do? Are you looking at setting a reg entry to note that an application was uninstalled? What problem are you trying to solve?
You run into the challenge of trying to use something for which it was not really intended. ActiveSetup lets you install per-user components the first time that they log in, do repairs for new profiles, etc. Basically it makes the software usable in the user space (to really simplify things). Trying to use AS after a product is uninstalled would do what - make the uninstalled product more unusable? or are you trying to use AS to clean up the Active Setup reg keys left behind?
You run into the challenge of trying to use something for which it was not really intended. ActiveSetup lets you install per-user components the first time that they log in, do repairs for new profiles, etc. Basically it makes the software usable in the user space (to really simplify things). Trying to use AS after a product is uninstalled would do what - make the uninstalled product more unusable? or are you trying to use AS to clean up the Active Setup reg keys left behind?
Comments:
-
Hi Arminius,
I need help regarding a similar problem I have with uninstalling NetMeeting.
I need to delete the HKCU keys under ActiveSetup->InstalledComponents for NetMeeting after uninstallation of NetMeeting.
The StubPath variable under HKLM/ActiveSetup/InstalledComponents for NetMeeting has the below command to delete the personalized settings which deletes the HKCU keys as well but this requires manual intervention to answer a dialog.
HKLM,%KEY_ACTIVE_SETUP_NT%,"StubPath",,"rundll32.exe advpack.dll,LaunchINFSection %17%\msnetmtg.inf,NetMtg.Remove.PerUser.NT"
But this does not do a silent removal of the settings and the HKCU keys but it throws a dialog asking the user if they have to be deleted or not. If "Yes" is chosen, the HKCU keys are deleted.
I need to do a silent uninstallation without manual intervention i.e I need to answer the dialog.
According to the description of the rundll entry point function LaunchINFSection , passing "1" as the fourth argument should do an silent "installation". I expected that it would answer the dialog but it does not work. I do not know if this flag is considered only during installation. I tried the below command to see if it does it silently. The argument for cabinet file is left empty in this case.
HKLM,%KEY_ACTIVE_SETUP_NT%,"StubPath",,"rundll32.exe advpack.dll,LaunchINFSection %17%\msnetmtg.inf,NetMtg.Remove.PerUser.NT,,1"
I could avoid the dialog by completely removing the "StubPath" variable but I would like the HKCU keys to be deleted.
Is there a way to answer the dialog silently?
OR
do I have to change the command in "StubPath" to something that deletes the HKCU keys explicitly as you mentioned in the below post?
http://www.itninja.com/question/how-to-remove-hkcu-keys-using-msi-after-uninstallation-of-a-product
Thanks in advance,
Rohini Chandra - rohini447 11 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.