Click here to Skip to main content
Click here to Skip to main content

Enhanced .NET Bootstrap Setup

By , 24 Nov 2005
 

Sample Image - DotNetSetup.gif

Introduction

In looking to install my .NET program on a Windows 98 or ME platform and even the newer XP and 2000 versions, I ran into several difficulties. There are several requirements to running a .NET program. The first is that the .NET framework needs to be installed prior to installing your program. The second problem is that one of the requirements for a .NET program is that IE 5.01 be installed. Windows 98 comes with IE 4.01 and Windows 98 SE comes with 5.0. And all installer files created by VS use the newer Microsoft Installer (version 2.0). I found the Microsoft setup program to be useful but not enough. So I set out to update the program. Little did I know that I had to dredge up my old Win API skills.

What you need to know

Note: This program was compiled with VS 2003 so the solution file may not work with older versions. I believe that the project will open in older versions as I was asked to convert the solution and not the project.

In order to use this program, you just have to update the settings.ini file.

Settings

The settings are:

  • MSI: Use this to point to your installer file.
  • ProductName: Use this to name your product.
  • FxInstallerPath: This is the path to the .NET installer. It looks for a file named Dotnetfx.exe.
  • IEInstallerPath: This is the path for IE 6.01. It looks for ie6setup.exe.
  • MSIInstallerPath: This is the path for MSI 2.0 (Microsoft's new installer). It looks for two files that you can download from Microsoft's site, InstMsiW.exe and InstMsiA.exe. These are for different versions of Windows.
  • MDACInstallerPath: This is the path for MDAC 2.7 (Microsoft Data Access). It looks for MDAC_TYP.EXE.
  • MDACVersion: 2.7 is the default.
  • .NetVersion: This can be v1.0 or v1.1.
  • MSDEInstallerPath: This is the path to the MSDE installer (Microsoft SQL Server Desktop Engine). It looks for a file named setup.exe.
  • MSDEParams: /settings <settings.ini file> SAPWD="strongpassword" - Note that a strong password is required.

All of the files above were downloaded from Microsoft's site so I won't include them. Note that I had to extract the MSDE files to a folder. Those files contained the setup files which are needed for the installer. The parameters are very important as the setup.exe program will not run without them. It is designed to be a silent application. The password is required but the settings file is not.

Place all of your files in a folder under this version of setup.exe and the settings.ini file. If any of the components above need installing, the dialog shown above will show up, otherwise your installer will run.

The source code is included if you need to make modifications.

Changes from Microsoft's version of bootstrapper:

  1. New dialog that shows what will be installed.
  2. New entries in the settings.ini file for IE 6, MSI, MDAC, & MSDE.
  3. New code for reading those entries.
  4. Code for displaying the dialog box and launching the new programs.

New Features

  1. Added MSDE support. This was added after a user request. It has not been fully tested.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Kevin Moore
Web Developer
United States United States
Member
No Biography provided

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneraldnimemberdB.28 Feb '09 - 18:31 
For those looking for a complete setup bootstrapper: http://www.codeplex.com/dotnetinstaller
 

GeneralThanks !memberNatza Mitzi10 May '10 - 21:42 
Thank you very much

Generalexe setupmemberMember #392135515 Mar '07 - 6:07 
Hi,
 
I been strugling for the last 4 days with the ms version, to try and make it open an exe file instead of an msi?
Do you know how i might be able to solve those?
 
Jimmi Hested
jhested@hotmail.com
GeneralAutoLaunch of an Apllication after installationmembermanjulasktp23 Jan '07 - 1:10 
Please help us to AutoLaunch the Application after installing the Setup.
We are using C#.Net
 
Application has to get started automatically after the installation is completed.
 

Would be helpful if sample is given .

GeneralRe: AutoLaunch of an Apllication after installationmembersud_sud123 Jan '07 - 3:41 
Hi,
 
try using LaunchApp(...) in your install script and execute the event after installation is completed..
 
Ex for launching notepad...
 
#define APPLICATION WINDIR^"Notepad.exe"
 
#define CMD_LINE WINDIR^"Readme.txt"
 
#include "Ifx.h"
 
export prototype ExFn_LaunchApp(HWND);
 
function ExFn_LaunchApp(hMSI)
begin
 

 
if (LaunchApp (APPLICATION, CMD_LINE) < 0) then
 
MessageBox ("Unable to launch "+APPLICATION+".", SEVERE);
 
endif;
 
end;
 
Hope it works.
The above code is from the help file from InstallShield...I think you will get answers there.
 
Let me know it worked or not?
 
~dinesh
GeneralRe: AutoLaunch of an Apllication after installationmemberKevin Moore23 Jan '07 - 5:57 
Yes, the launching of your program after the installation should be part of your installer.
 
Kevin
GeneralRe: AutoLaunch of an Apllication after installationmembershiv_10827 Aug '09 - 21:00 
sir
can you do this using c#.currently i m working on a c# project and i m using sfx(a type of encrypted file ) but unable to launch applications one after another.
GeneralRe: AutoLaunch of an Apllication after installationmembershiv_10827 Aug '09 - 21:01 
sir
can you do this using c#.currently i m working on a c# project and i m using sfx(a type of encrypted file ) but unable to launch applications one after another.
shiv
9917163656
GeneralRe: AutoLaunch of an Apllication after installationmemberKevin Moore28 Aug '09 - 4:16 
The whole point of this program is to install .Net so that you can use C#, so you can't use C# to do this.
That's why it has to be in C.
GeneralAutoLaunch of an Application after installation [modified]membermanjulasktp22 Jan '07 - 1:01 
Please help us to AutoLaunch the Application after installing the Setup.
We are using C#.Net
 
Application has to get started automatically after the installation is completed.
 

-- modified at 7:06 Monday 22nd January, 2007
 
Would be helpful if sample is given .
Generalinstall more .msi oncememberlovvver24 Sep '06 - 7:15 
because many programs have more than one msi,does it support to install more .msi once?
such as in .ini file:
msi=a.msi,b.msi
...
many thanx~
Bright Zhang
GeneralRe: install more .msi oncememberKevin Moore26 Sep '06 - 11:33 
No, the installer can only install 1 file. I'm not sure but I think it might be possible for your msi file to launch another msi file.
 
Kevin Moore
QuestionRe: install more .msi oncememberlovvver26 Sep '06 - 23:16 
my program has two .msi for server and client,but I want to install them in one computer once.
how to do that with ur setup.exe/ini?

Generalfxservicepackmembertnybubble21 Aug '06 - 10:30 
Hi!
 
Why does the .exe files look for the v1.1 service pack even if I commented it out from the settings.ini file?
 
Thanks!

 
Emeleen
GeneralRe: fxservicepackmemberKevin Moore15 Sep '06 - 5:08 
How did you comment it out?
 
Kevin
GeneralWindows Installer 3.0membertnybubble21 Aug '06 - 8:59 
Does this work with installing Windows Installer 3.0? as this is required before .NET framework 2.0 will be installed... I notice that the redistributable package of microsoft has different filename... WindowsInstaller-KB884016-v2-x86.exe
will the MSIInstallPath still see this .exe file?
 
Thanks!
 
Emeleen
GeneralRe: Windows Installer 3.0memberKevin Moore15 Sep '06 - 5:07 
If the Windows installer has changed, I think you can just change the name in the ini file.
 
Kevin
QuestionJava RuntimememberNeroToxic17 Aug '06 - 1:34 
Thanx for the post, exactly what I needed.
Couple of questions.
 
1 - Is there someway that I can also include the java runtime, as I use fop for my reports and need the java runtime.
 
2 - If you cancel the setup for the .net service pack the whole thing exists, can I just not include the service pack, reason why is that after it installs the service pack it wants to reboot the machine, if you do the installation doesn't continue automatically, you have to manually run it again and then deselect the msde and .net for the first screen, otherwise it tries to install it again.
 
Many thanx
 
He who laughs last is a bit on the slow side

AnswerRe: Java RuntimememberKevin Moore18 Aug '06 - 5:27 
Unfortunately, the way the program is written every new item must be hard coded into the installer. I started work on a different version that just installs the .Net framework and then launches a C# program that can install any number of programs but I've stopped work on it. (Too busy with 3-4 hour commutes)
 
I think you should be able to just remove the service pack from the properties file.
 
Kevin
GeneralRe: Java RuntimememberNeroToxic20 Aug '06 - 20:24 
Thanx for the quick reply.
 

Kevin Moore wrote:
I think you should be able to just remove the service pack from the properties file.

 
Do you mean within the source or the ini file.
 
Many thanx again.
 
He who laughs last is a bit on the slow side

GeneralRe: Java RuntimememberKevin Moore15 Sep '06 - 5:06 
Within the ini file.
 
Kevin
QuestionIs it compatilbe with .NET 2.0?memberPMaksim6 Jul '06 - 9:39 
Is it compitalbe with .NET framework 2.0? Can I just change .NET version in .ini file to 2.0?
AnswerRe: Is it compatilbe with .NET 2.0?memberKevin Moore11 Jul '06 - 10:33 
It should work fine with 2.0. Give it a try, but make sure you change the version number as well.
 
Kevin
QuestionBug in billboard dialogmembergreggigi21 Jun '06 - 19:37 
I tried fixing this, but I'm simply not smart enough to fix it. Can you find a way to fix this?
 
When one of the pre-reqs is being installed, if you click and move the billboard window around via the title bar, and never release the mouse button, the dialog will never disappear and the app will just sit there with the dialog up.
 
I know, "why would a user ever do that" ... hey, it could happen especially with some of the smaller setups.
AnswerRe: Bug in billboard dialogmemberKevin Moore11 Jul '06 - 10:21 
It sounds like you don't have the latest code. I've removed the billboard as it was giving me all kinds of grief.
 
Kevin

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web03 | 2.6.130523.1 | Last Updated 24 Nov 2005
Article Copyright 2003 by Kevin Moore
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid