Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 144
  • Last Modified:

Exploring Registry in Windows 95

please tell me how to read the windows registry (better if source code is given) especially exploring.
0
bluebird031198
Asked:
bluebird031198
1 Solution
 
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
 
d003303Commented:
Look at the TRegistry-object if you are using D2/3 or the TRegIni-object in D1.

Slash/d003303
0
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!

 
williams2Commented:
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
 
bluebird031198Author Commented:
thanks a lot.
0
 
williams2Commented:
You are welcome anytime! :-)
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now