Page 1 of 1

Empty registry entry creation

Posted: Tue Aug 30, 2011 6:28 am
by NickDay
I am trying to replace an existing installer which made an empty registry entry in HKCR, in a 'folder' named with the name of the application, and containing (as seen in the Windows 7 Registry Editor):

Name: (Default)
Type: REG_SZ
Data (value not set)

I have in my InstallAware installer
Write Registry Key HKCR\The name of my application\,
The Value and Data fields of the Write Registry dialog are empty (I have checked very carefully), and the type is String.
But this creates an entry like this:

Name: (Default)
Type: REG_SZ
Data

Notice that the Data field is blank, rather than (value not set).

Why is this a problem to me?
When I try to read the entry in another installer, with 'Check Registry Key', and empty Value field, with the old installer's entry I get NO$VALUE
But with the InstallAware installer's entry I get a blank, maybe a space. It's as if the data field of the 'empty' string registry entry which InstallAware created is not 'Value not set' but a space, or tab or some other whitespace.

I am needing to create an identical entry to that created by another installer, so my new InstallAware installer can fit into an 'ecosystem' of existing installers we are trying to gradually replace with InstallAware ones.

Is there a way a I can create a truly empty '(value not set)' string value in the registry, please?

Re: Empty registry entry creation

Posted: Tue Aug 30, 2011 6:45 pm
by giaviv
Nick,

Try writing the value NO$VALUE - let me know if that worked for you.

Re: Empty registry entry creation

Posted: Wed Aug 31, 2011 4:17 am
by NickDay
Thanks for your two replies Aviv.
It will probably be a week before I'm back on that project, in case I appear rude by not replying sooner.

Re: Empty registry entry creation

Posted: Thu Sep 08, 2011 9:51 am
by NickDay
Rather than creating an entry which appears in the registry as I would prefer:

(Default) REG_SZ (value not set)

if using InstallAware 11 I do:
Write Registry Key HKCR\<my key name>\NO$VALUE of type String

it appears to me that this creates
(Default) REG_SZ (value not set)
NO$VALUE REG SZ
the data column is blank.

I think this will do for me (as, reading the value, I get NO$VALUE), though it's a little strange if it really does create two entries.