Board index » delphi » Writing install programs for Windows 3.1

Writing install programs for Windows 3.1

Can anyone tell me how to write install (setup) programs to set up the
new program group and place program items in it using Object Windows in
Borland Pascal 7.

thank you.

 

Re:Writing install programs for Windows 3.1


Hi

You need to invoke DDE to Program Manager to do that. Sorry I don't have
the code immediately available.

Phil

Re:Writing install programs for Windows 3.1


Alan & Devon Williams (willb...@netcon.net.au) wrote:
: Can anyone tell me how to write install (setup) programs to set up the
: new program group and place program items in it using Object Windows in
: Borland Pascal 7.
:

Check PROGDDE.PAS, in your EXAMPLES directory.

The Chief
--------
Dr. A{*word*73}la A. Olowofoyeku (The African Chief)
Email: la...@keele.ac.uk
Author of: Chief's Installer Pro 3.10 for Win16 and Win32:
           Winner of PC PLUS Magazine Gold Award (April 1995 U.K. edition)
           http://ourworld.compuserve.com/homepages/African_Chief/
           ftp://ftp.simtel.net/pub/simtelnet/win3/install/chief310.zip  

Re:Writing install programs for Windows 3.1


Alan & Devon Williams wrote:

Quote

> Can anyone tell me how to write install (setup) programs to set up the
> new program group and place program items in it using Object Windows in
> Borland Pascal 7.

In Turbo Pascal for Win 1.0 (1.5?)package there was a demo PROGTALK.PAS
included. This demo created program groups and icons.

Re:Writing install programs for Windows 3.1


Quote
A.A. Olowofoyeku (la...@cc.keele.ac.uk) wrote:

: Alan & Devon Williams (willb...@netcon.net.au) wrote:
: : Can anyone tell me how to write install (setup) programs to set up the
: : new program group and place program items in it using Object Windows in
: : Borland Pascal 7.
: :
:
: Check PROGDDE.PAS, in your EXAMPLES directory.

Ahem .... I meant PROGTALK.PAS ....

The Chief
--------
Dr. A{*word*73}la A. Olowofoyeku (The African Chief)
Email: la...@keele.ac.uk
Author of: Chief's Installer Pro 3.10 for Win16 and Win32:
           Winner of PC PLUS Magazine Gold Award (April 1995 U.K. edition)
           http://ourworld.compuserve.com/homepages/African_Chief/
           ftp://ftp.simtel.net/pub/simtelnet/win3/install/chief310.zip  

Re:Writing install programs for Windows 3.1


In article <3312555...@ren2.netconnect.com.au>, Alan & Devon Williams <willb...@netcon.net.au> wrote:

Quote
>Can anyone tell me how to write install (setup) programs to set up the
>new program group and place program items in it using Object Windows in
>Borland Pascal 7.

>thank you.

Try Setup Factory 4.0 from www.IndigoRose.com.  It is very easy to use and
sets up program groups and icons as well as installing files, etc.  I've used
it for years and wouldn't go without it.

Regards,

Brett

Re:Writing install programs for Windows 3.1


Quote
>Can anyone tell me how to write install (setup) programs to set up the
>new program group and place program items in it using Object Windows in
>Borland Pascal 7.

Use InstallShield3 16-bit version. It is powerful tool.

Re:Writing install programs for Windows 3.1


Alan & Devon Williams wrote:

Quote

> Can anyone tell me how to write install (setup) programs to set up the
> new program group and place program items in it using Object Windows in
> Borland Pascal 7.

> thank you.

Use the Wise Installation System from Great Lakes Business Solutions.
If however you want to write your own installer, you've got to set
up a out own DDE-session, using a DDE-clientservice called "PROGMAN".
Read the help-topics on DDE. The sample below is Delphi 1.0 code - I
know
this is not what you want, but it may give you a hint i the right
direction.

DELPHI 1.0 SAMPLE:
******************

procedure TMainForm.MakePMGroup;
var
  Tmp: array[0..255] of char;
  Rc: boolean;
  Path: String;
  TxtName: String[12];
  IconName: String[40];
begin
  with DdeClientConv do  { A Delphi-component om my form }
  begin
    DDEService := 'ProgMan';
    DDETopic := 'ProgMan';

    StrPCopy(Tmp, '[CreateGroup(My Programs)]');     { Create then group

Quote
}

    Rc := ExecuteMacro(Tmp, TRUE);
    while WaitStat do Application.ProcessMessages;

    StrPCopy(Tmp, '[ReplaceItem(My Application for Windows)]');  {
Create or update item }
    Rc := ExecuteMacro(Tmp, TRUE);
    while WaitStat do Application.ProcessMessages;

    StrPCopy(Tmp, '[AddItem('+ParamStr(0)+','+Application.Title+')]');
{ Add command-linetext }
    Rc := ExecuteMacro(Tmp, TRUE);
    while WaitStat do Application.ProcessMessages;
  end;
end;

/Martin Ahler, Denmark

Re:Writing install programs for Windows 3.1


{
  ACTOR Automatisering
  Eric Janssen, 22/05/96
  ac...@cuci.nl

Quote
}

unit Progman;

interface

uses
  SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  Forms, Dialogs, DdeMan;

type
  EProgManError = class(Exception);

  TProgMan = class(TComponent)
  private
    FDdeClientConv: TDdeClientConv;
    procedure InitDDEConversation;
    function ExecMacroString(Macro: String): Boolean;
  public
    { Public declarations }
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;

    procedure CreateGroup(GroupName: String);
    procedure DeleteGroup(GroupName: String);
    procedure DeleteItem(ItemName: String);
    procedure AddItem(CmdLine, ItemName: String);
  end;

implementation

const
  SDDECreateGroup     = '[CreateGroup(%s)]';
  SDDEShowGroup       = '[ShowGroup(%s, 1)]';
  SDDEDeleteGroup     = '[DeleteGroup(%s)]';
  SDDEDeleteItem      = '[DeleteItem(%s)]';
  SDDEAddItem : PChar = '[AddItem(%s, "%s", %s)]';

constructor TProgMan.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  InitDDEConversation;
end;

destructor TProgMan.Destroy;
begin
  if Assigned(FDdeClientConv) then FDdeClientConv.CloseLink;
  inherited Destroy;
end;

function TProgMan.ExecMacroString(Macro: String): Boolean;
var buff: array[0..255] of char;
begin
  StrPCopy(buff, Macro);
  Result := FDdeClientConv.ExecuteMacro(buff, False);
end;

procedure TProgMan.InitDDEConversation;
begin
  FDdeClientConv := TDdeClientConv.Create(Self);
  if not FDdeClientConv.SetLink('PROGMAN', 'PROGMAN') then raise
EProgManError.Create('Failed to establish DDE Link');
end;

procedure TProgMan.CreateGroup(GroupName: String);
begin
  if not ExecMacroString(Format(SDDECreateGroup, [GroupName])) then
    raise EProgManError.Create('Kan programmagroep niet maken. Groep: '
+GroupName);
  if not ExecMacroString(Format(SDDEShowGroup, [GroupName])) then
    raise EProgManError.Create('Kan programmagroep niet tonen. Groep: ' +
                                GroupName);
end;

procedure TProgMan.DeleteGroup(GroupName: String);
begin
  if not ExecMacroString(Format(SDDEDeleteGroup, [GroupName])) then
    raise EProgManError.Create('Kan programmagroep niet verwijderen. Groep:
' +
                                GroupName);
end;

procedure TProgMan.DeleteItem(ItemName: String);
begin
  if not ExecMacroString(Format(SDDEDeleteItem, [ItemName])) then
    raise EProgManError.Create('Kan programma niet verwijderen. Programma:
' +
                                ItemName);
end;

procedure TProgMan.AddItem(CmdLine, ItemName: String);
var
  P: PChar;
  PSize: Word;
begin
  PSize := StrLen(SDDEAddItem) + (Length(CmdLine) * 2) + Length(ItemName) +
1;
  GetMem(P, PSize);
  try
    StrFmt(P, SDDEAddItem, [CmdLine, ItemName, CmdLine]);
    if not FDdeClientConv.ExecuteMacro(P, False) then
      raise EProgManError.Create('Kan programma niet toevoegen. Programma:
' + ItemName);
  finally
    FreeMem(P, PSize);
  end;
end;

end.

Alan & Devon Williams <willb...@netcon.net.au> schreef in artikel
<3312555...@ren2.netconnect.com.au>...

Quote
> Can anyone tell me how to write install (setup) programs to set up the
> new program group and place program items in it using Object Windows in
> Borland Pascal 7.

> thank you.

Other Threads