|
-
Jan 31st, 2008, 10:17 PM
#1
Thread Starter
New Member
UnauthorisedAccessException
Hi ,
I am trying to change the datavalue of a registry key using dotnet c#
The code i use is as follows
RegistryKey key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Shared Tools\\Web Server Extensions\\12.0\\WSS");
if (key != null)
{
key.SetValue("SetupType","V2V_INPLACE_UPGRADE");
f1.Logger("Registry value in the key SetupType is succesfully set as V2V_INPLACE_UPGRADE");
}
How ever i am not able to set the value as an unhandled exception gets thrown UnauthorisedAccessException saying i dont have the access privileges .
how ever i am the administrator and i am able to change the registry settings manually .
kindly help me out regarding this .
Thanks in advance
have a nice day
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|