Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / September 2007

Tip: Looking for answers? Try searching our database.

How can set that both limited users and privileged users can write to a registrykey in c#

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
marcussilfver@gmail.com - 03 Sep 2007 08:34 GMT
How can I set write permissions for a limited user to write values to
a certain registrykey. This registrykey is also written to by a
administrator (which probably also created the key in the first
place).
I have looked at the RegistryPermission class but would really like to
see a code sample on this.

How can it be done, simplest way possible?

thanx
Vadym Stetsiak - 03 Sep 2007 11:33 GMT
Hello, marcussilfver@gmail.com!

To secure separate registy key, you need to setup Access Control List (ACL)
on that key.

Here's the example how to set ACL on the files -
http://west-wind.com/weblog/posts/4072.aspx.
The same is valid for registry keys.

Here's also the example in MC++ -
http://www.codeproject.com/dotnet/SecureRegistryKey.asp

--
With best regards, Vadym Stetsiak.
Blog: http://vadmyst.blogspot.com

You  wrote  on Mon, 03 Sep 2007 00:34:05 -0700:

m> How can I set write permissions for a limited user to write values to
m> a certain registrykey. This registrykey is also written to by a
m> administrator (which probably also created the key in the first
m> place).
m> I have looked at the RegistryPermission class but would really like
m> to see a code sample on this.

m> How can it be done, simplest way possible?

m> thanx
marcussilfver@gmail.com - 03 Sep 2007 12:43 GMT
> Hello, marcussilf...@gmail.com!
>
[quoted text clipped - 5 lines]
>
> Here's also the example in MC++ -http://www.codeproject.com/dotnet/SecureRegistryKey.asp

Thanks for answering, however I have to use .Net 1.1 so the solution
described in the first link is not available to me unfourtunately.
I have not looked so much on the 2nd link yet, but I guess I could use
that unmanaged code for the task.

I rather do it purely in c# though (if possible)

Is there a way to enable a limited user to write to a certain
registrykey in c# in .Net 1.x or do I have to resort to unmanaged code
for this when developing .Net 1.x applications?

RegistryPermission class exist in .Net 1.x could this class solve this
issue?
Vadym Stetsiak - 03 Sep 2007 12:57 GMT
Hello, marcussilfver@gmail.com!

RegistryPermission won't help you, since they're regulate registry
permissions within your code, and not in the OS.

IMO the only way left is the unmanaged way (see link 2 from the previous
answer)

You wrote  on Mon, 03 Sep 2007 04:43:58 -0700:

m> On 3 Sep, 12:33, "Vadym Stetsiak" <vadm...@gmail.com> wrote:
>> Hello, marcussilf...@gmail.com!

>> To secure separate registy key, you need to setup Access Control List
>> (ACL)
>> on that key.

>> Here's the example how to set ACL on the files
>> -http://west-wind.com/weblog/posts/4072.aspx.
>> The same is valid for registry keys.

>> Here's also the example in MC++
>> -http://www.codeproject.com/dotnet/SecureRegistryKey.asp

m> Thanks for answering, however I have to use .Net 1.1 so the solution
m> described in the first link is not available to me unfourtunately.
m> I have not looked so much on the 2nd link yet, but I guess I could
m> use that unmanaged code for the task.

m> I rather do it purely in c# though (if possible)

m> Is there a way to enable a limited user to write to a certain
m> registrykey in c# in .Net 1.x or do I have to resort to unmanaged
m> code for this when developing .Net 1.x applications?

m> RegistryPermission class exist in .Net 1.x could this class solve
m> this issue?

--
With best regards, Vadym Stetsiak.
Blog: http://vadmyst.blogspot.com

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.