Class TInstForm (unit InstUnit)

Inherits from

TForm

these modules are for Delphi 3 shell links: ComObj, ActiveX, ShlObj

Constructors



Functions

procedure CancelButClick(Sender: TObject);

Save with a WideString filename

procedure FormActivate(Sender: TObject);

if we are auto-uninstalling, then we are still in OnCreate, so we can't close this form yet.

procedure FormCreate(Sender: TObject);


procedure InstButClick(Sender: TObject);


procedure MakeAssociation(Ext: String; PgmToLinkTo: String);

Create a Win95 file association in the registry.

procedure MakeLink(PgmPath, PgmArgs, LinkPath, Descr: String);

Make a Shell Link, also called a "shortcut"

procedure RegDeleteKey(RKey:HKey; KeyPath: String);

extension we want to undefine

procedure RemoveAssociation(Ext: String);

command line to open file with

procedure SetValInReg(RKey:HKey; KeyPath: String; ValName: String; NewVal: String);

Set a value in the registry.

procedure UninstButClick(Sender: TObject);


Properties

Events

Variables

AssocCB : TCheckBox;


CancelBut : TButton;


DesktopCB : TCheckBox;


GroupBox1 : TGroupBox;


InstBut : TButton;


Label1 : TLabel;


Label2 : TLabel;


Label3 : TLabel;


ProgramNameLabel : TLabel;


RegistryCB : TCheckBox;


SendToCB : TCheckBox;


StartMenuCB : TCheckBox;


UninstBut : TButton;



Constructors


Functions


procedure CancelButClick(Sender: TObject);

Save with a WideString filename


procedure FormActivate(Sender: TObject);

if we are auto-uninstalling, then we are still in OnCreate, so we can't close this form yet.


procedure FormCreate(Sender: TObject);


procedure InstButClick(Sender: TObject);


procedure MakeAssociation(Ext: String; PgmToLinkTo: String);

Create a Win95 file association in the registry. This uses the Quick-and- Dirty method used by Explorer when you right click on a file and choose "Open With...". Basically, the file extension is created as a class, and a dummy file type is created for that class to tell Win95 which program to run. Once this is done, you can easily test it from a DOS Shell by typing: START FILENAME.EXT Be advised: This is where I expected file associations to be (because there are already some associations there), but they seem to have no effect: HKEY_CURRENT_USER,'Software\Microsoft\Windows\CurrentVersion\Extensions'


procedure MakeLink(PgmPath, PgmArgs, LinkPath, Descr: String);

Make a Shell Link, also called a "shortcut"


procedure RegDeleteKey(RKey:HKey; KeyPath: String);

extension we want to undefine


procedure RemoveAssociation(Ext: String);

command line to open file with


procedure SetValInReg(RKey:HKey; KeyPath: String; ValName: String; NewVal: String);

Set a value in the registry. This is NOT related to the .LNK code. This will create a new registry key if it doesn't already exist.


procedure UninstButClick(Sender: TObject);


Properties


Events


Variables


AssocCB : TCheckBox;


CancelBut : TButton;


DesktopCB : TCheckBox;


GroupBox1 : TGroupBox;


InstBut : TButton;


Label1 : TLabel;


Label2 : TLabel;


Label3 : TLabel;


ProgramNameLabel : TLabel;


RegistryCB : TCheckBox;


SendToCB : TCheckBox;


StartMenuCB : TCheckBox;


UninstBut : TButton;