/build/static/layout/Breadcrumb_cap_w.png

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

0 Comments   [ + ] Show comments

Answers (9)

Posted by: anonymous_9363 12 years ago
Red Belt
0
I'd say you have the positioning of the condition wrong. Post the relevant part of the component table's content here (remember to use the CODE tag).
Posted by: fiqa 12 years ago
Senior Yellow Belt
0
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
Posted by: fiqa 12 years ago
Senior Yellow Belt
0
Here is Componet table Content

Component (S72) ComponentId(S38) Directory_(s72) Attributes(i2) Condition(S255) KeyPath
NewComponent1 {23DF6589-6D13-4287-9BF9-FGR48FES} INSTALLDIR 8 REMOVE="ALL"
Posted by: jmcfadyen 12 years ago
5th Degree Black Belt
0
try add the ~ to your condition. It will make the "ALL" search case insensitive. (unlikely to affect much but just in case)
Posted by: Matias M Andersen 12 years ago
Senior Yellow Belt
0
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
Posted by: pjgeutjens 12 years ago
Red Belt
0
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
Posted by: jmaclaurin 12 years ago
Third Degree Blue Belt
0
What will the second active setup be doing?
Posted by: jmcfadyen 12 years ago
5th Degree Black Belt
0
nice pickup PJ i didnt even notice it was during uninstall.

you could try deleting the component code and setting the condition. (untested might work tho)

you will lose complete control of this item if you do this and it works.
Posted by: Arminius 12 years ago
Second Degree Green Belt
0
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?

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.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ