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 NOT remove a registry on uninstall?


7 replies to this topic

quakey

quakey
  • Full Members
  • 33 posts

Posted 17 November 2004 - 03:05

Hi guys,

I am using Wise for Windows Installer and trying to create a registry key during installation but DO NOT remove it during uninstall. Is that possible? I am really newbie to this and just starting to learn.

THANKS.

mandy

mandy
  • Members
  • 121 posts

Posted 17 November 2004 - 09:57

You install and remove components with Windows Installer - not files and regsitry keys.

You have to make the component permanent by adding the msidbComponentAttributesPermanent bit (16) to the attributes column of the component table.

You can set through the wise interface (properties of the component).

quakey

quakey
  • Full Members
  • 33 posts

Posted 17 November 2004 - 22:17

QUOTE (mandy @ 2004-11-17 09:57)
You install and remove components with Windows Installer - not files and regsitry keys.

You have to make the component permanent by adding the msidbComponentAttributesPermanent bit (16) to the attributes column of the component table.

You can set through the wise interface (properties of the component).

Hi,

Thanks for your help!

However, I can't seem to find the place to set the bit? I went in the components
in Wise and for registry I saw the following fields:

Registry | Root | Key | Name | Value | Component_

And if I went in the Details, I have only two tabs: General and Permissions.

Please help. I am stuck.

quakey

quakey
  • Full Members
  • 33 posts

Posted 17 November 2004 - 22:24

QUOTE (mandy @ 2004-11-17 09:57)
You install and remove components with Windows Installer - not files and regsitry keys.

You have to make the component permanent by adding the msidbComponentAttributesPermanent bit (16) to the attributes column of the component table.

You can set through the wise interface (properties of the component).

Hi,

Please disregard my previous reply as I found out that I could set the
attributes in the Component table (not in the Components tab in Wise).

But, for some reasons, the registry isn't shown up as one of the components
in the table. It does show up if I go in features->Combined->Registry.

Why is that?

mandy

mandy
  • Members
  • 121 posts

Posted 18 November 2004 - 00:28

Your registry key isn't a component - it belongs to a component.

The fields you mentionned belong to the registry table.

QUOTE
Registry | Root | Key | Name | Value | Component_


The "Component_" field tells you which component the registry entry belongs to.

Then you set the appropriate bit in the attributes column of the component table for the record pertaining to the component that contains your registry key.


quakey

quakey
  • Full Members
  • 33 posts

Posted 18 November 2004 - 02:42

QUOTE (mandy @ 2004-11-18 00:28)
Your registry key isn't a component - it belongs to a component.

The fields you mentionned belong to the registry table.

QUOTE
Registry | Root | Key | Name | Value | Component_


The "Component_" field tells you which component the registry entry belongs to.

Then you set the appropriate bit in the attributes column of the component table for the record pertaining to the component that contains your registry key.

Hi,

Components huh? I didn't know WI is based on components. Now I know that and
everything seems to make way more sense than before!

Since then I've learnt to mess around with tables instead of just relying on Installation
Expert. Those tables are really the heart of WI.

Now I have another question. I would like to change a registry value depending on
whether it is an install or uninstall. I have two components:

registry_install: The condition is NOT Installed. The key path is also called
registry_install and it just writes to a key.
registry_uninstall: The condition is REMOVE~="ALL". The key path is also called
registry_uninstall and it just writes to a key.

I compiled and ran the installer. The key was written successfully upon install. But
it doesn't get written when I uninstalled it. I am puzzled as I really think the condition
I set for those components should work for my purpose. Can you please help?

Thank you.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 18 November 2004 - 08:46

Uninstall will remove anything it put in during install. Uninstall will not install anything. You should use a custom action if you need to write to the registry during uninstall.

quakey

quakey
  • Full Members
  • 33 posts

Posted 19 November 2004 - 01:08

QUOTE (Stefan Krueger @ 2004-11-18 08:46)
Uninstall will remove anything it put in during install. Uninstall will not install anything. You should use a custom action if you need to write to the registry during uninstall.

I see...thanks!