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

Update non-shared reg but NEVER remove


4 replies to this topic

dbareis

dbareis
  • Full Members
  • 85 posts

Posted 20 March 2002 - 22:02

Hi,

From what I can see it is not possible to create an MSI to update standard Windows registry entries WITHOUT marking a component as not to be uninstalled.  There is no way to mark particular registry entries.

I may wish future versions of the package to set these same entries differently or decide on a different mix of registry changes altogether.

If I make a component uninstallable then from my reading of the limited doco available this will leave the component "hanging around" forver (and not throw details in bit bucket. I am worried that after lets say 100 updates I will have 100 extra components, taking up space and slowing things down.

Am I missing something obvious?

Thanks for any help,
Dennis
---
Dennis Bareis (dbareis@No.Spam.gmail.com)
Free MSI update/creation tool (MAKEMSI):
http://users.cyberon...eis/makemsi.htm

gardinerg

gardinerg
  • Members
  • 6 posts

Posted 25 March 2002 - 14:38

Don't know if this is what you want but....

If you use the registry functions in the Installscript and disable the logging (for uninstallation) then you end up with registry keys that are left behind even after an uninstall.

These can be removed in the onMaintUIAfter event if necessary - but this could be dependant on a set of conditions.....

e.g. inside the OnFirstUIBefore() function:

Disable(LOGGING);
nRootKey = HKEY_LOCAL_MACHINE;
if (RegDBSetDefaultRoot (nRootKey) < 0) then
  MessageBox ("Unable to obtain registry information!", INFORMATION);
else
   szKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce";   //needs to be asynchronus
nType = REGDB_STRING;
szName = "StringKeyName";
szValue = "Value of key";
if (RegDBSetKeyValueEx ( szKey, szName, nType, szValue, -1 ) < 0) then
   MessageBox ("Unable to set registry key", WARNING);
endif;
endif;
Enable(LOGGING);

Hope this in some way helps.

Grant

Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 25 March 2002 - 16:04

If you keep the component guid constant you will only ever have one instance of the component.
Ian Blake
(Currently Unemployed)

dbareis

dbareis
  • Full Members
  • 85 posts

Posted 25 March 2002 - 22:15

I use Wise Installer and if I keep the component GUID constant then I believe (at least by MS rules) I can't add/remove/modify registry entries. If I did I would probably have to play with the keypath to ensure unique every time...

What I did find out but haven't as yet tried is that if you make the component GUID null (hopefully empty OK) this should do the trick. I'm not sure if this is possible via Wise API etc.

What I've decided to do for now is let them get uninstalled. I have tested the particular registry entries I currently using and Windows rebuilds these (and they are not critical values).

If I get any problems with this I will try the null component ID and if that fails I will try anything else I might have come up with or give up on using the tables and use regedit via custom action.

Thanks for the responses.
---
Dennis Bareis (dbareis@No.Spam.gmail.com)
Free MSI update/creation tool (MAKEMSI):
http://users.cyberon...eis/makemsi.htm

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 26 March 2002 - 17:17

Moved to General MSI forum since the question is not specific to InstallShield Developer