Solved

Windows Registry full access for a user

Posted on 2003-11-16
6
224 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now