?
Solved

Registry

Posted on 2003-03-30
3
Medium Priority
?
502 Views
Last Modified: 2010-08-05
I have administrator account. I want to change the permissions for a registry key. I want all the users of a computer to be able to change a certain registry key through my program. How can I do that by Delphi programming? Please, help me.
0
Comment
Question by:MikeMonroe
[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
  • 2
3 Comments
 
LVL 1

Expert Comment

by:nafeelm
ID: 8237411
This is just to give you an idea how you could change information stored in the registry.


You will have to add the 'Registry' unit to the main uses clause.

procedure TMainForm.FormCreate(Sender: TObject);
var Reg: TRegistry;
begin
  Reg := TRegistry.Create;
  Reg.RootKey := HKEY_LOCAL_MACHINE;
  Reg.OpenKey('Software\Borland',False);

  //then you can use
  Reg.ReadString('variable name'); // to read info. from registry

  Reg.WriteString('variable', 'data value'); // to write info. into registry

  Reg.CloseKey;
  Reg.Free;
end;
0
 
LVL 9

Expert Comment

by:tkalchev
ID: 8237625
The registry in NT has permissions just like files. They are set and modified using REGEDT32.EXE.

Browse to the keys or subkeys you want to modify, then select "Security", "Permissions" from the menus. Add permissions just like you would to files and folders, specifying "Replace permission on existing subkeys" if necessary.

To assign all possible permissions, select the root of "HKEY_LOCAL_MACHINE" and "HKEY_USERS". These are really the only 2 root keys. The others are derived.

Once the users have the proper registry permissions, then can use any method available to them to do what they need to do..be it directly using regedit or regedt32, or programmatically.

0
 
LVL 9

Accepted Solution

by:
tkalchev earned 60 total points
ID: 8237645
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

719 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