You have your terms mixed up, so it is 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 am 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 does not have that ability. If it does then
you should be using the function version instead of
the sub version, so you will have error codes.
I am 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",
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 am not too familiar with registry key
Why the duplication?
Any help would be greatly appreciated.