Solved

Installing 16bit app into 3.11, 95, NT

Posted on 1997-07-10
16
167 Views
Last Modified: 2010-04-06
I have a simple app to be installed.
Just an exe and some other files in a single folder.
The problem comes with registering them.
I need to install into program manager in 3.11, and onto the start menu in 95 and NT.
I remember something about DDE to talk to program manager, but can't recall the details.
Does anyone have completed code to do this (I'm willing to pay a little), or can point me to some shareware/freeware?
Failing this, how do you put items into the Start Menu?

Bryan

PS
Sorry about the points, they're all I've got!
0
Comment
Question by:bcrotaz
  • 8
  • 5
  • 2
  • +1
16 Comments
 
LVL 2

Expert Comment

by:icampbe1
Comment Utility
Well, to put things in Start Menu drop them in C:\Windows\Start Menu.
You can also drag/drop into the appropriate directory inside that tree.
You can also drag/drop onto the start button.
You can also right click on the task bar, choose options + Start Menu Programs.....

For deploying programs however, why not use InstallShield.  It comes with all versions of Delphi, and that is what it is for... Installing programs.
It works very well.

Cheers,
Ian C..

0
 
LVL 1

Author Comment

by:bcrotaz
Comment Utility
Erm...
InstallShield Express only installs into 32bit systems.
I need to install a 16 bit app into 3.1, 3.11, 95 and NT

Thanks for the directory info though.

Bryan
0
 
LVL 5

Expert Comment

by:ronit051397
Comment Utility
In win 3.11. If you want to create a group in the file manager, as you indicated, you use dde. In delphi1 in the demos directory under dde examples there is an example of how to create a group.
This is supposed to work also on win95, but it is not recommended, since, it will create a group, like in win3.11 and not items in the startmenu. In my oppinion, you cannot create
items in the startmenu in delphi16, becuse it doesn't make since that an application that use 16 bit api's will support 32 bit api's. Instead, In this case, also i recommend of the InstallShield Express.
0
 
LVL 1

Author Comment

by:bcrotaz
Comment Utility
Hmmm.

I need to distribute a single 1.44MB floppy (client's insistence) with an app that will run on Win 3.11 -> NT.  The 32 bit version of the app zips down to 650kB.
Do the above comments mean I have to have two installers - one for 16 bit, one for 32 bit, with two corresponding apps???
Any ideas?
0
 
LVL 5

Expert Comment

by:ronit051397
Comment Utility
1. If you write an Installation program or any other application in delphi and you compile it with the 16 bit version. This Installation program/application will work also under win95 (I don't know about NT). In Principle, any 16 bit application can work under a 32 bit enviroment, but not the opposite.

2. Win95 supports on the old win 3.11 program manager, as I indicated before.

3. You cannot Install with a program which creates a startmenu on win3.11, simply, becuase there is no startmenu on win3.11.

Did I understand you well?
0
 
LVL 1

Author Comment

by:bcrotaz
Comment Utility
Sorry, I was really looking for a completed app.
I'm in a bit of a hurry.
I'll withdraw the question soonish.
0
 
LVL 1

Accepted Solution

by:
fsanchez earned 100 total points
Comment Utility
Hello Bryan. This code is extracted from my own installation system. It has worked on Windows 3.11, Windows 95 and Windows NT. Note that DdeClientConv is a TDdeClientConv component with its DdeService property set to 'Progman'.
----------------------
unit Inst;

interface

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

type
  TFormExample = class(TForm)
    DdeClientConv: TDdeClientConv;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { List of sentences for Progman }
    ProgmanSentences: TStringList;

    procedure IncludeProgmanSentence(Sentence: String);
    procedure ExecuteProgman;
  end;

var
  FormExample: TFormExample;

implementation

{$R *.DFM}

procedure TFormExample.FormCreate(Sender: TObject);
begin
  ProgmanSentences := TStringList.Create;

  IncludeProgmanSentence('[CreateGroup("My group")]');
  IncludeProgmanSentence('[ShowGroup("My group",1)]');
  IncludeProgmanSentence('[AddItem(MyPath\MyProgram.exe,"MyProgramName")]');
  IncludeProgmanSentence('[AddItem(MyPath\MySecondProgram.EXE,"MySecondProgramName")]');
  IncludeProgmanSentence('[ExitProgman(1)]');
  ExecuteProgman;

  ProgmanSentences.Free;
end;

{ Includes another sentence for Progman }
procedure TFormExample.IncludeProgmanSentence(Sentence: String);
begin
  ProgmanSentences.Add(Sentence);
end;

{ Executes all the sentences }
procedure TFormExample.ExecuteProgman;
begin
  if ProgmanSentences.Count > 0 then
  begin
    FormExample.DDEClientConv.OpenLink;
    FormExample.DDEClientConv.ExecuteMacroLines(ProgmanSentences, False);
    FormExample.DDEClientConv.CloseLink;
  end;
end;

end.

0
 
LVL 1

Author Comment

by:bcrotaz
Comment Utility
I understand its operation in Win 3.11... What does it do in 95 and NT?

Bryan
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 1

Author Comment

by:bcrotaz
Comment Utility
Adjusted points to 100
0
 
LVL 1

Expert Comment

by:fsanchez
Comment Utility
Well, it creates a group under Start | Programs. That's the logical approach, I think.
0
 
LVL 1

Author Comment

by:bcrotaz
Comment Utility
A group being a folder containing a shortcut?
Or a menu item containing a shortcut?
0
 
LVL 1

Expert Comment

by:fsanchez
Comment Utility
The group in Windows 3.1 is mapped to a group folder in Start|Programs in Windows 95 and Windows NT 3.5 and above.
The icons contained in that group in Windows 3.1 are mapped to shortcuts belonging to the group folder.

Is exactly the same behavior that you may expect from any 16bit program that you install on Windows 95 or NT.
0
 
LVL 1

Expert Comment

by:fsanchez
Comment Utility
Do you have any more question?
0
 
LVL 1

Author Comment

by:bcrotaz
Comment Utility
I'm just playing with it today - other things got in the way (as usual!!!)

I'll grade your answer on Monday.

Thanks.
0
 
LVL 1

Expert Comment

by:fsanchez
Comment Utility
Sorry, I think you should grade or reject this answer now, because it is going out of date.
0
 
LVL 1

Author Comment

by:bcrotaz
Comment Utility
Sorry - my ISP link was down for a couple of weeks....
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now