Exploring Registry in Windows 95

please tell me how to read the windows registry (better if source code is given) especially exploring.
bluebird031198Asked:
Who is Participating?
 
williams2Connect With a Mentor Commented:
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
 
pjdbCommented:
Just reading? Use the regedit.exe program (c:\windows\regedit.exe)

JDB
0
 
bluebird031198Author Commented:
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
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
d003303Commented:
Look at the TRegistry-object if you are using D2/3 or the TRegIni-object in D1.

Slash/d003303
0
 
bluebird031198Author Commented:
thanks a lot.
0
 
williams2Commented:
You are welcome anytime! :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.