In the real world application development we deal with windows application and after programming the app, the time comes to create the Installer or the Set up file.In this article we will explore the same.
IntroductionIn the real world application development we deal with windows application and after programming the app, the time comes to create the Installer or the Set up file.In this article we will explore the same.
- Creating setup
- Giving Icons
- Installing it in a Specific Directory in Program Files.
Using the code
Over here we assume that we already have the project ready of which we need to create the set up and also it should be open in Visual Studio 2010 as seen in the below Image
Now we see that we already have the project open in Visual Studio.After this we need to right click on the Solution Icon in the Solution Explorer -> Select Add New Project ->
as seen in the below Image
Now we get the option to select the project type and select the following options as in the Image
Options to Select
Other Project Types -> Visual Studio Installer -> Set up Project
Give the Location and the Name as per your Requirement and where you want the setup to be created i.e. which folder the set up should be stored.
Once done with the above steps we will get the following screen.
Now click on the application folder on the Left hand side under File System on Target Machine.
After that right click on the empty area in the Middle pane and select Project Output -> Primary Output and Click "OK"
We will get the following Screen
Now right click on the Primary Output and Select Create shortcut and do it for 2 times. After that Rename the shortcut as you want and drag it to the Users Desktop folder and User Program Menu Folder under File System on Target Machine on left hand side.
Now right Click on File System on Target Machine -> Select Add Special Folder and then Select Custom Folder and name it as ICON
Now right Click on the Folder ICON and then Select Add File and now browse the Image that you want to set as ICON.
Note :- The image should be an .ico file.
Once you select the file just add it as shown in the screen
Once file has been added go to User Desktop folder and Shortcut will seen that we created in above steps.
Right Click on the Shortcut that we have created and Click Properties and select the Icon Property and Browse the ICON and select the ICON from the ICON folder that we have created.
Now we will get the ICON folder select it and select the file that we have stored in the ICON Folder.
Now we will see the ICON that we have added to the ICON Folder select it and Click OK
Repeat this step for the shortcut created in User Program Menu.
Now Click on the Project and you have will see the Property Window and now you can make changes as you want check the screen
Now you can go below for which bit you want to create the App 32 bit or 64 Bit by changing the Target Platform.
Now right Click on the Project that we have created Click Build and let it complete once it is completed you will get the set up in the folder that you gave earlier in the Location Box while creating the project.
In the debug folder we will find the setup.
Hope this will be useful.............