[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.setup

Duplicate (Default) value when creating new Registry key

Dave Rayment

3/31/2006 9:51:00 AM

Hi,

I want my newly-installed DLLs to be available on the target machine's Add
References lists, so I'm attempting to add the target directory to the
following Registry key in my installer:

HKCU/Software/Microsoft/.NETFramework/AssemblyFolders/[ProductName]

I need to add a (Default) value under this key with an associated string of
"[TARGETDIR]".

Modelling this in the setup project's Registry editor was simple, but on
installation, there are two (Default) entries under the new folder!

Is there a way to control the default value on newly-created folders or to
set it to the [TARGETDIR] value without resorting to a custom action?

Many thanks,

Dave
1 Answer

Dave R.

3/31/2006 10:11:00 AM

0

I found the solution through some further experimentation. If you create the
string value with the name "(Default)" it does not work (i.e. it creates a
duplicate). However, if you set the name field to blank it writes the value
to the default value correctly.

I'd recommend a little note about this in the MSDN topic as it had me
stumped for hours!

Cheers,

Dave

"Dave Rayment" wrote:

> Hi,
>
> I want my newly-installed DLLs to be available on the target machine's Add
> References lists, so I'm attempting to add the target directory to the
> following Registry key in my installer:
>
> HKCU/Software/Microsoft/.NETFramework/AssemblyFolders/[ProductName]
>
> I need to add a (Default) value under this key with an associated string of
> "[TARGETDIR]".
>
> Modelling this in the setup project's Registry editor was simple, but on
> installation, there are two (Default) entries under the new folder!
>
> Is there a way to control the default value on newly-created folders or to
> set it to the [TARGETDIR] value without resorting to a custom action?
>
> Many thanks,
>
> Dave