Old 26th January 2012, 19:48   #1
Junior Member
Join Date: Jan 2012
Posts: 1
How to write empty value for REG_MULTI_SZ in registry

It seems there is a little issue with writing empty value for REG_MULTI_SZ.

Here is the code:
${registry::Write} "HKEY_LOCAL_MACHINE\SOFTWARE\test" "CommandLine" "" "REG_MULTI_SZ" $R0

The result is:

But this is not empty string - but string with one string separator.

The real "empty" result must be:

This is the value afte creation of empty REG_MULTI_SZ in regedit.

And if I use this code:
${registry::Write} "HKEY_LOCAL_MACHINE\SOFTWARE\test" "CommandLine" "$\n" "REG_MULTI_SZ" $R0

the result is

So - it seems that registry::Write is always adds extra \0 to the value, and this is new string for REG_MULTI_SZ. How I can avoid this from nsis script?
cuberbox is offline   Reply With Quote
Old 2nd February 2012, 15:24   #2
Afrow UK
Afrow UK's Avatar
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You will have to call the Reg* APIs directly using the System plug-in.

Afrow UK is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump