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
Solved

Windows Registry full access for a user

Posted on 2003-11-16
6
228 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
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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone 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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…

840 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