I am working on windows application after long time, after completing application when I decided to create a setup file in Visual Studio 2012 and found that there is no Setup and Deployment project as it was in Visual Studio 2008. I search for sometime and InstallShield which allows user to create Setup project. Let me share how to create a simple Setup or MSI package for your application.
Step 1: Download and Install InstallShield Express edition from here.
Step 2: Open visual Studio and select File New Project. From new project dialog select Other Project Types – Setup & Deployment and you can see InstallShield project as shown below.
Fig –1 Create Setup Project
Once you press OK button, it will create a project and open a screen as shown in below image. As you can see InstallShield provide 6 simple steps to create Setup file.
Fig –2 InstallShield home screen
Step 3: Application Information – This step allows you to provide detail about your company, application and current version of application. You can version number as MajaorVersion.MinorVersion.BuildNumber . For simplicity I have used Sample detail in all fields.
Fig –3 InstallShield – Application information
Step 4: Application requirement – This step allows you to OS and necessary prerequisites to be installed on client machine to run your application. You can select all version of windows by choosing “No” or select appropriate version of windows by choosing “Yes”. Select version of .NET framework require on client machine to run your application. Make sure you choose all necessary options, this is important as if you miss any, your application will not work on client machine.
Fig –4 InstallShield – Installation Requirements
Step 5: Installation Architecture – This step allows you to choose features you want to include in this setup. As this is limited/express edition you can not choose features, everything will be installed. For example, if you have develop two new modules in this version however you just want to release only one module, you can select that module here.
Fig –5 InstallShield – Installation Architecture
Step 6: Application Files – Here you have to select files/folders which is required to run your application. If you are not sure which configuration files and exe are required, the easiest way is to select all files from BIN folder. If you have XML configuration files in different folder you can select Add folder option to add them.
Fig –6 : InstallShield – Application Files
Step 7 Application Shortcut – Decide where do you want to add shortcut of your application. Select icon for shortcuts by selecting .ico file. This icon will appear as shortcut at selected path.
Fig –7 InstallShield – Application Shortcuts
Step 8: Application Registry – If your application is reading specific value from registry than it must be available in client machine’s registry. Here is you can add these values in registry. For example, if you want that your Application will run for 15 days only, than add a key in registry which store installation date and every time your application compares system date with registry entry to check number of days. This is not most secure way or desirable way to make sure your application run for 15 days only however I am just giving an example. Please do not mess with registry if you are not sure how to use it.
Fig –8 InstallShield – Application Registry
Step 9: Installation Interview – The first option says “Do you want to display a license agreement dialog?”. If you have your terms and condition and agreement defined than create .rtf file and select that file using browse button. Choose “No” and agreement dialog will not be displayed to client. Other options listed on screen is very simple to understand so select appropriate option in that.
Fig –9 InstallShield – Application Interview
This was the last step and now you are ready to generate your Setup/MSI package. Right click on project name from solution explorer and click on Rebuild option. This will generate Setup/MSI in “<your solution file path>\Express\DVD-5\DiskImages\DISK1” folder. \Express\ can be different depending on InstallShield version you have installed. Here is the Setup file generated by our steps.
Fig –10 InstallShield – Generated Setup files
Let me know if you have any questions.
Happy Programming !!!
Hi Chirag,
I would like to make setup file using Installshield
Here is my requirement :
My project includes Windows Service and while installation using Installshield wizard I would like to ask user to give credentials to run windows service under. Also, there are few project settings to be set while installation. How do I achieve that? Any ideas?
Hi ..
Im still new for this, but I have little knowledge about codding and query and I already have installshield that you recommend.
the problem is how to make the setup. include database (SQL Server) in it.?
tq before..
hii
I have created a setup file containing a MFC application using installshield and visual studio 2012. The created setup works properly on my computer but when i try to run the setup on other computer it gives following error-
This setup was created with evaluation version of installshield. Evaluation setups work for only 5 days after they were build. Please rebuild the setup to run it again. The setup will now exit.
with this message setup closes. the other computer has visual studio but not installshield.
Is installshield required on other computer also? Or i have done any other error while building setup ?
Thanks for this great article. I have created this setup for my Outlook Addin. Have set the LoadBehavior property to 3. But after a few days, the registry entry of LoadBehavior automatically got changed to 2 and the add in started appearing in my “disabled add ins” section stating that the add in is taking more action to load than usual. Please tell me how can this be fixed?
Here whatever you expline thid us realy help full but if in application use the database then how it will attech with setup ?
Please give ans fastly.
and thanks for shere it.
do you get any solution for that product??
if you get the perfect solution then send us email on:
info@xuperb.co.in
sir i want to add all necessary prerequisites those are install by my setup of application ,
how i attach database with my files??
if outlook application is running then i am installing setup of outlook but there are no showing message “Can not installing because outlook is already running. Close outlook and then install setup”. so how to create setup for it with alert if outlook is running.
I’ve got empty folder after installing setup?could you please let me know the actual problem?
Hi,
I’ve got a problem while executing my exe. I created a setup file and installed it on my PC. It works fine. whereas it doesn’t work on the client machine. The installed file doesnot open and quits automatically without showing any error. I also tried it on my colleague’s PC and it works probably because we have Visual studio installed. What files am I missing here?
I am keen to know, how will I prepare a setup file when I have compiled code for website? don’t want any other frills like DB connectivity, registry entry etc, but this setup should ask to setup IIS and should deploy compiled code to that website location.
getting below error while installing using VSTO Deployment :
Name: PowerPointAddIn
From: file:///C:/Program Files (x86)/Pyramid/My Product Name/PowerPointAddIn.vsto
************** Exception Text **************
System.Deployment.Application.InvalidDeploymentException: File, PowerPointAddIn.dll.config, has a different computed hash than specified in manifest.
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.DownloadAddIn(TimeSpan timeout)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
Basically I have powerpoint -Add-Inn and for that I am creating setup