473,396 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Registry HKCU permission problem

Hi,
One of the users of my program has been having difficulties, and I've
pinpointed the problem to the following. I have a line of code like:

RegistryKey key = Registry.CurrentUser.OpenSubKey(
"Software\\MyProgram",true);

to open a writable registry key to store settings. This line generates a
security exception for him (message: "Requested registry access is not
allowed."). However, if I change the line to open the key read-only,
this succeeds.

I've checked that his security settings are "Full trust", so I'm out of
ideas as to why he wouldn't be able to write to his own CurrentUser keys
- can anyone think of anything else I should check?
Jul 21 '05 #1
1 1675
Could it be that the NT permissions on this registry key are not correct ? I
would give this a look using regedit to see if it's a framework or NET
issue...

Patrice
--

"Sine Nomine" <in*****@nospam.com> a écrit dans le message de
news:d5**********@jura.cc.ic.ac.uk...
Hi,
One of the users of my program has been having difficulties, and I've
pinpointed the problem to the following. I have a line of code like:

RegistryKey key = Registry.CurrentUser.OpenSubKey(
"Software\\MyProgram",true);

to open a writable registry key to store settings. This line generates a
security exception for him (message: "Requested registry access is not
allowed."). However, if I change the line to open the key read-only,
this succeeds.

I've checked that his security settings are "Full trust", so I'm out of
ideas as to why he wouldn't be able to write to his own CurrentUser keys
- can anyone think of anything else I should check?

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: vincemoon | last post by:
Below is an excerpt from my Registry Log, created by Redmon, showing the process whereby TweakUI added the compressed folder option to the new sub-menu in the right click context menu for open...
3
by: Danny | last post by:
Hi I just have a quick question. One of our Windows based application uses the registry for configuration type options and some other things. I want to modify our application to move to use a...
10
by: Clint | last post by:
Hey all - I'm having a really confusing problem concerning a web service. Right now, I have an application that needs to call a web service that does nothing but return "true" (this will...
1
by: Robert Drozdz | last post by:
Hello everybody! There are many posts here concerning registry access and some derived problems. I couldn't find however any simple answer to this basic question: How can an impersonifited...
2
by: Henry Fleming | last post by:
I have an C# assembly that is supposed to read a registry key: RegistryKey regCurrentUser = Registry.CurrentUser; RegistryKey regSoftware = regCurrentUser.OpenSubKey("Software",true);...
1
by: Sine Nomine | last post by:
Hi, One of the users of my program has been having difficulties, and I've pinpointed the problem to the following. I have a line of code like: RegistryKey key = Registry.CurrentUser.OpenSubKey(...
3
by: Ahmad Jalil Qarshi | last post by:
Hi! I am developing an application in C# as a windows NT Service. This application needs to check for eventlog using EventLog.Exists("System") But unfortunately it generates exception...
20
by: Newbie Coder | last post by:
MFC Application VC++.NET 2003 I have a certain registry key (HKCU\Software\MyKey) that contains between 30 & 64 string values I need to write a '*' to all those 30 - 64 string values under...
11
by: Unknown Hero | last post by:
Tim Golden wrote: The first link which points to the Python documentation for the _winreg module I already checked, even before coming here. I am wondering how I should do the loop I need (go...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.