Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

How to retain Registry After uninstallation


Best Answer Stefan Krueger , 13 January 2014 - 15:49

Maybe this is your problem:

 

When a key is uninstalled, all of its subkeys are also uninstalled. Therefore, if you use RegDBCreateKeyEx to create a key or keys under a key that is already logged for uninstallation, the keys that you create will be uninstalled when the higher-level key is uninstalled. This behavior occurs regardless of whether logging is enabled when the installation creates your keys and regardless of the order in which the installation creates the keys.

(from the RegDBCreateKeyEx documentation)

Go to the full post


3 replies to this topic

aakash.tiwari12@gmail.com

aakash.tiwari12@gmail.com
  • Full Members
  • 34 posts

Posted 07 January 2014 - 07:49

Untitled.png Hi ,

 

i want to retain one registry entry even after uninstallation of product.

Or i want to create one registry entry in some other place while uninstallation.

Can we this kind of stuff with installscript??

 

 

Thanks,

Aakash


Edited by aakash.tiwari12@gmail.com, 09 January 2014 - 13:34.


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 08 January 2014 - 22:04

In MSI: mark the component as permanent, or empty the ComponentId.

In InstallScript: Call Disable(LOGGING) before creating the entry, and Enable(LOGGING) afterwards.



aakash.tiwari12@gmail.com

aakash.tiwari12@gmail.com
  • Full Members
  • 34 posts

Posted 09 January 2014 - 13:38

Hi Stefan,

 

Thanks for your reply. But i think i have not clearly explained my requirement to you.

Now i edited the post with one screenshot. i want to retain one entry from the registry key not the entire key.

i have marked the entry with red color which i want to preserve.

I am creating this registry from installscript and it is not related to any MSI component.

 

>>In InstallScript: Call Disable(LOGGING) before creating the entry, and Enable(LOGGING) afterwards.

is not working for me

Please let me know your view on this.

 

Thanks and Regards,

Aakash



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 13 January 2014 - 15:49   Best Answer

Maybe this is your problem:

 

When a key is uninstalled, all of its subkeys are also uninstalled. Therefore, if you use RegDBCreateKeyEx to create a key or keys under a key that is already logged for uninstallation, the keys that you create will be uninstalled when the higher-level key is uninstalled. This behavior occurs regardless of whether logging is enabled when the installation creates your keys and regardless of the order in which the installation creates the keys.

(from the RegDBCreateKeyEx documentation)