Solved

How to read registry values using a limited account in XP?

Posted on 2004-09-28
4
263 Views
Last Modified: 2010-05-18
I have an application that reads some registry values. The app works fine in an Administrator account but when tried in an ordinary user account (limited), my app failed cause it can't read the registry anymore. It just gave me nothing, no errors received.

Btw, I am using the Registry classes of .NET. I have tried the permission but it didnt work.

Can someone give me a working sample? Thanks!
0
Comment
Question by:MichaelPongan
  • 2
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
eozz_2000 earned 125 total points
ID: 12177014
Are you trying to open de registryKey as writtable?
0
 

Author Comment

by:MichaelPongan
ID: 12177079
Yes. Does it matter? Here's the snippet.
Dim reg As RegistryKey = Me.GetRegKey(Me.pvtClassKey)
reg = reg.OpenSubKey(Me.pvtSectionKey, True)
ret = reg.GetValue(Me.pvtValueKey, "")
0
 
LVL 4

Expert Comment

by:eozz_2000
ID: 12180089
And... ¿if you try to put instead of Me.pvtValueKey the exact name of the value?
0
 

Author Comment

by:MichaelPongan
ID: 12186287
It worked. I just open the registrykey as readonly. Thanks!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question