Solved

Windows Registry full access for a user

Posted on 2003-11-16
6
231 Views
Last Modified: 2010-05-18
Registry problem, Delphi 7 Personal
--------------------------------------
A part of procedure for reading:

RegSource := TRegistry.Create;
RegSource.RootKey := RKey;
RegSource.Access := KEY_ALL_ACCESS;
try
  if RegSource.OpenKey(KeyName, False) then
  // here goes some tasks e.g RegSource.ReadString(), and other
finally
  RegSource.CloseKey;
  RegSource.Free;
end;

and similar for writing (with RegDest.WriteString).

I need personalized settings for different users. They work with program which doesn't have such a feature. I mean e.g. personalized key shortcuts. The program stores its settings in LOCAL_MACHINE, and the registry is the only place when a user can change it (terrible software :( ). So I'm gonna write two applications. The first copies all these settings from CURRENT_USER to LOCAL_MACHINE when a user logs to windows. Another application allows to edit these settings and stores them to LOCAL_MACHINE and CURRENT_USER.
I want to copy a key and all its items from CURRENT_USER to LOCAL_MACHINE. If a key in HKCU doesn't exist the program creates it and copies all entries from HKLM (it happens only the first time, when a user's start using my program). I hope you understand me...

Everything works ok only for a user with administrator rights. Although a user without administrator rights can use regedit.exe and change all these settings - both in HKCU and HKLM. Only using my program he cannot :( I thought that Regxxx.Access := KEY_ALL_ACCESS can give me a full access but it doesn't work.

BTW. INDY requires  baseclx,visualclx. My Delphi 7 Personal doesn't have them... ??
 
Can anybody help me?

Regards,
Jacek
0
Comment
Question by:JacekH
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 

Expert Comment

by:thegetta
ID: 9796899
80 points, are you kidding?
0
 

Author Comment

by:JacekH
ID: 9798510
120 is ok for you? ;)

jh
0
 
LVL 2

Expert Comment

by:TheLeader
ID: 9841335
did you tries XML, with XML you can use registry without Admin rights
0
 

Author Comment

by:JacekH
ID: 9841602
Sorry, I use Delphi 7 Personal Edition and it doesn't include WebSnap.

jh
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 12808399
PAQed with points refunded (160)

modulo
Community Support Moderator
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

688 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