Solved

Exploring Registry in Windows 95

Posted on 1998-03-23
6
141 Views
Last Modified: 2010-04-06
please tell me how to read the windows registry (better if source code is given) especially exploring.
0
Comment
Question by:bluebird031198
[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
 
LVL 1

Expert Comment

by:pjdb
ID: 1360728
Just reading? Use the regedit.exe program (c:\windows\regedit.exe)

JDB
0
 

Author Comment

by:bluebird031198
ID: 1360729
I mean I want to make a program that can run as an Install Shield, so while installing a software we added registry entry to Windows 95 Operating System. Thank you for your answers.
0
 
LVL 4

Expert Comment

by:d003303
ID: 1360730
Look at the TRegistry-object if you are using D2/3 or the TRegIni-object in D1.

Slash/d003303
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Accepted Solution

by:
williams2 earned 30 total points
ID: 1360731
Try this:

unit Unit1;

interface

uses
  Windows, Forms, Dialogs, Registry, StdCtrls, Controls, Classes;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

Function GetExecuteable(Const Extension: String): String;
// Extension = '.XXX'
var
  Reg: TRegistry;
  FileType: String;
Begin
  Result:= '';
  Try
    Reg:= TRegistry.Create;
    With Reg do
    Begin
      Reg.Rootkey:= HKEY_CLASSES_ROOT;
      If OpenKey(Extension,False) then // We don't want to create key
      If ValueExists('') then // '' means default value
      Begin
        FileType:= ReadString('');
        CloseKey;
        if OpenKey(FileType+'\Shell\Open\Command',False) then
        if ValueExists('') then Result:= ReadString('');
      End;
    End;
  Finally
    Reg.Free;
  End;
End;

procedure TForm1.Button1Click(Sender: TObject);
begin
  ShowMessage('Executable: '+GetExecuteable(Edit1.Text));
end;

0
 

Author Comment

by:bluebird031198
ID: 1360732
thanks a lot.
0
 
LVL 3

Expert Comment

by:williams2
ID: 1360733
You are welcome anytime! :-)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

707 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