duplicate registry key

  • Thread starter Thread starter JAG
  • Start date Start date
J

JAG

I'm attempting to add a subkey (Suppress DWF Upgrade Warning) and
value (1) to an existing registry key as follows:

Const userRoot As String = "HKEY_CURRENT_USER"
Const subkey As String = "SOFTWARE\AppDataLow\Software\Au​
todesk\Design_ Review\Preferences\User Interface\Suppress Warnings"
Const keyName As String = userRoot & "\" & subkey_
Registry.SetValue(keyName, "Suppress DWF Upgrade Warning",
1)

This code works great in XP, but in Windows 7 and Vista the Autodesk
key and subkeys are duplicated instead of adding the subkey and value
to the Suppress Warnings key as desired.

The permissions for the Autodesk key seem to be the same between XP
and 7/Vista, though I'm not too familiar with registry key
permissions.

Why the duplication?
Any help would be greatly appreciated.
 
You have your terms mixed up, so it's hard to
understand what the problem is. The item on the left
is a subkey. "Suppress DWF Upgrade Warning" is
a value. 1 is the data.

I'm not familiar with .Net Registry functions, but since
no one else is answering....

* You should have permission to write to HKCU.

* If you use regular Registry API functions you can
check the return value to see why it fails. (.Net
apparently doesn't have that ability. If it does then
you should be using the function version instead of
the sub version, so you'll have error codes.

------------------------------------
I'm attempting to add a subkey (Suppress DWF Upgrade Warning) and
value (1) to an existing registry key as follows:

Const userRoot As String = "HKEY_CURRENT_USER"
Const subkey As String = "SOFTWARE\AppDataLow\Software\Autodesk\Design_
Review\Preferences\User Interface\Suppress Warnings"
Const keyName As String = userRoot & "\" & subkey_
Registry.SetValue(keyName, "Suppress DWF Upgrade Warning",
1)

This code works great in XP, but in Windows 7 and Vista the Autodesk
key and subkeys are duplicated instead of adding the subkey and value
to the Suppress Warnings key as desired.

The permissions for the Autodesk key seem to be the same between XP
and 7/Vista, though I'm not too familiar with registry key
permissions.

Why the duplication?
Any help would be greatly appreciated.
 
Thank you for your time, and clarification on what a subkey and value
are in the registry. Much appreciated.

Even though the IDE and Notepad failed to show it, I had a special
character embedded in my code, causing the duplicate registry entry in
7/Vista.

Moving on....
 
Back
Top