?
Solved

Windows Registry full access for a user

Posted on 2003-11-16
6
Medium Priority
?
232 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses
Course of the Month11 days, 22 hours left to enroll

752 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