Create Setup file with Merge Module selected

Thursday, August 20, 2009

You Might come across this problem,that you need some software to be installed before
your destop application installed in that computer ,software like windows installer etc.

so you can follow below step, from which you will be able to add software in setup file itself ,which will result ,when you will click on your .exe file ,the setup will first install all the required software then it will install you application.

1. Select “Release” in Solution configuration Dropdown in toolbar.
2. Open the project for which you want to create the Setup.
3. File->Add->New Project
4. Select “Other Project Types” in Project Types tab and select “Setup and Deployment”.
5. Select “Merge Module Project” give the path and click on Ok.
6. It will open one window. Right click on “Module Retargetable Folder” at the right side of the window
7. select Add->File
8. And add three files (if .Net framework not installed in machine then it will install automatically)
a. Dotnetfx
b. Instmsia
c. WindowsInstaller-KB893803-v2-x86
9. Open Solution Explorer and right click on your created Merge Module and select Build.
10. Repeat step 1 to 3.
11. Select “Setup Wizard”. Give the path and click on Ok
12. Click on Next in Setup Wizard 1.
13. Select “Create a setup for a Windows application” in Choose a project type window and Click on Next.
14. Check the “Primary output from” in Choose project outputs to include.
15. If any extra files or DLL you used in application then add it by click on Add button in Choose files to include window and click on Next.
16. Click Finish.
17. It will open one window.
18. Select Application Folder at the left side in window.
19. Right click on “Primary output from oDeskClient(Active)“ and choose “Create shortcut to Primary output from oDeskClient(Active)” and give the proper name of the shortcut.
20. Drag this shortcut in User’s Desktop folder at the right side of the window. It will create shortcut on your Desktop when u run the setup.
21. Open Solution Explorer and right click on your created Setup and select Properties.
22. Click on Prerequisites button and it will open new window.
23. Select prerequisites you used in application.
24. Select “Download prerequisites from the same location as my application” in specify the install location for prerequisites tab. And click on Ok. Click Apply and after that click on Ok,
25. Right click on Setup and select Add->Merge Module.
26. Select the .msm file which will created in your Merge Module folder -> Release. And click open
27. Open Solution Explorer and right click on your created Setup and select Build.
28. Once run the application.

For More details contact
Rajesh Singh
Asp.Net Developer
Indianic infotech ltd (India)

No comments :