IERegisterWritableRegistryKey

Add-in Express™ Support Service
That's what is more important than anything else

IERegisterWritableRegistryKey
 
Mark Williams




Posts: 26
Joined: 2010-09-30
Does anyone have any advice on how to implement IERegisterWritableRegistryKey during setup? See here - http://msdn.microsoft.com/en-us/library/cc197003(v=VS.85).aspx. Not a lot of direction and not much on the Internet.
Posted 01 Oct, 2010 08:32:51 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Hi Mark.

As far as I know, the writable key is 'HKEY_CURRENT_USER\Software\AppDataLow\<Any User's sub-key>'.
Posted 01 Oct, 2010 10:09:40 Top
Mark Williams




Posts: 26
Joined: 2010-09-30
Thanks for your help. I am getting an UnauthorizedAccessException when I try to create a subkey in HKEY_CURRENT_USER\Software\AppDataLow\

I am doing this: PsKey.CreateSubKey("ClipsMaster IE AddOn");

Where PsKey's value is {HKEY_CURRENT_USER\Software\AppDataLow}

What am I doing wrong?
Posted 01 Oct, 2010 12:59:17 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Hi Mark.

I can't reproduce the issue. I use the code below:

using (RegistryKey key = Registry.CurrentUser.CreateSubKey("Software\\AppDataLow\\MyKey"))
{
if (key != null)
key.SetValue("", "Test");
}
Posted 04 Oct, 2010 06:10:54 Top