Tuesday 10 January 2012

How to create setup file in Visual studio 2008

Here are the steps.
1.First open your windows application project.
2. Goto File> Add > New Project
3. Select Other Project Types > Setup Project.
Give the project a suitable name i.e., the name you require to be displayed
in add remove programs.

Now a new setup project is added into your solution.

4. The File System Editor should have opened. if not then open it by
using View > Editors > File System
5. Now you will have to add the project output to the application folder.
Right click on Application Folder > Add > Project Output.Select Primary
output and click ok.

5. If you want to put a shortcut to the desktop or to the program menu
then right click on the project output the click "create shortcut to...." .
Drag this into the "User's Desktop" or
to the "User's Program Menu"

6. Now we need to enter the user information.
Select the setup project and press F4 to open the properties window.
You will see many user definable properties like Author, manufacturer
etc etc.. Just enter the details as per your wish.

7. Now if you want to bundle .NET framework with the setup then go to
Project > Properties. > prerequisits , Check .NET framework 2.0.
Select "Download prerequisits from the same location as my application.
Click OK.

8. Once the above things are done you can just right click on the
setup project and click Build or Rebuild. This will generate the nessary
setup file for your project to be deployed.

You can copy the setup files from
Your Solution\Your setup project\Release\

There will be two files. One is .MSI and other is Setup.EXE then there
will be a folder which has the .NET framework, setup.exe is a bootstrap
executable, that means it will run on any system which doesnt have the
prerequisits installed. If the system doesnot have .NET framework the the
setup will automatically install it.

DONOT run the installer from the .MSI it doesnot detect if the system has
.NET framework or not.. always run the setup.exe.

Also it will be a good idea to include Windows Installer 3.1 in the
prerequisits as its nessary for .NET framework installer.

No comments:

Post a Comment