Solved

Windows Registry full access for a user

Posted on 2003-11-16
6
230 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Suggested Solutions

Title # Comments Views Activity
LAN or WAN ? 11 116
Twebbrowser in Fire monkey android scrolling to bottom 1 80
Broadcast a message using ICS 2 48
Using MMsystem To change audio input 1 36
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

738 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