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 append to an existing registry entry


3 replies to this topic

russellperry

russellperry
  • Full Members
  • 31 posts

Posted 24 July 2006 - 17:35

Is there a quicker way to do this, other than reading the value into a property, appending the value, and writing it back?

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 25 July 2006 - 07:20

For multiline strings (REG_MULTI_SZ): Yes, quote from the Registry Table documentation for the Value column:
QUOTE
If a [~] precedes the string list, the strings are to be appended to any existing registry value strings. If an appending string already occurs in the registry value, the original occurrence of the string is removed.

Similar functionality exists for the Environment table. But not for registry entries in general if they are not multi_sz.

russellperry

russellperry
  • Full Members
  • 31 posts

Posted 25 July 2006 - 17:20

It seems that this only works for null-delimited strings. The value I want to append to is semi-colon delimited. I've tried putting [~] on either end of the string, and it always overwrites the existing value.

Glytzhkof

Glytzhkof
  • Moderators
  • 1,447 posts

Posted 26 July 2006 - 05:28

I think you will have to resort to VBScript or Installscript for this to work reliably.
Regards
-Stein Åsmul