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

Modifying a REG_SZ value in the registry


3 replies to this topic

mstone

mstone
  • Members
  • 20 posts

Posted 13 March 2004 - 13:49

MSI documentation says that it's possible not only to replace a REG_MULTI_SZ value in the registry, but also to have it modified (i.e. to append something to the existing value). I tried this for a REG_SZ value and failed. Is it possible to modify a REG_SZ value or do I have to write a custom action for that?

hteichert

hteichert
  • Members
  • 158 posts

Posted 15 March 2004 - 09:45

I never tried to modify a registry entry via the registry table (without a custom action), but as I read Microsofts documentation:
Direct modification (appending/prepending something) is only possible for REG_MULTI_SZ, not for REG_SZ. This special possibility is necessary, because there is no way to work with 0-delimited values in properties.
But you could change a REG_SZ registry value by first reading its current value to a property via AppSearch action (you have to put entries in the RegLocator and AppSearch tables for this) and then reinserting the read value via a formatted string in the registry table.
h.teichert-ott

mstone

mstone
  • Members
  • 20 posts

Posted 17 March 2004 - 14:08

Yes, I thought of it, but it only works for appending something to the value, and is not suitable for deletion. And what I actually need is to add the path to my application to the Outlook path list ('HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\Outlook.exe\Path') upon installation and remove it from there during uninstallation. Currently it's handled in the DllRegServer/DllUnregServer of one of my DLLs.

hteichert

hteichert
  • Members
  • 158 posts

Posted 18 March 2004 - 09:45

You have to use a custom action. The other windows installer mechanisms don't suffice to solve this partial value removal on uninstall (content dependend editing).
h.teichert-ott