Click here to Skip to main content
15,891,943 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello. I originally built our product installers using the Setup & Deployment project in Visual Studio which automatically builds a bootstrapper (Setup.exe) that can check for prerequisites such as the .NET framework, however, I ran into so many problems with the custom action code not elevating properly that I decided to rewrite the installer as a Windows Forms Application which builds to an .exe.

The installer works great, but because it's just a standard .exe Visual Studio does not build a bootstrapper for it automatically. This results in me not being able to check for prerequisites. The .exe requires the framework in which it was built (4.0) to run. Because there is no prerequisite check if the user tries to run the application without having the framework installed the .exe bombs.

I would like to know how to create a Setup.exe file to check for prerequisites similar to what is built for .MSI projects, but I would like it to kick off my .exe installer after the prerequisite check.
Posted
Comments
Subramanyam Shankar 18-Mar-15 12:15pm    
Do you have knowledge of WIX Bootstrapper?
because I cannot write all the steps.
Member 3882548 18-Mar-15 12:33pm    
I looked into WIX but it seemed like I needed to create my project as a WIX application. It is currently a standard win forms project. Am I mistaken in this assumption?

First, the Setup and Deployment project in Visual Studio is gone as of Visual Studio 2010.

It also sucked.

Use a seperate installation authoring tool such as Wix, InstallShield, InnoSetup, or whatever. They all target making .MSI installations and provide all of the functionality you're looking for without having to write dependency checking code.

If you insist on writing your own Setup.exe you'll have to do it in a language that has it's runtime already built into Windows, such as C/C++.

The .NET Framework 4.0 wasn't installed as a standard part of Windows until Windows 8, so you can't assume that the machine will have it when your Setup.exe is launched.
 
Share this answer
 
Hi,

I think you will get the solution what you wanted from the below mentioned link,
http://bryanpjohnston.com/2012/09/28/custom-wix-managed-bootstrapper-application/[^]

Thanks, Mohit
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900