Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create an InstallShield LE project to install a windows service?

I downloaded Visual Studio 2012 yesterday when it was released on MSDN. I have noticed that a few of the project types that we had in 2010 are gone or different. The biggest difference for me right now is the removal of the Windows Installer project. Now we are being forced to use the InstallShield LE (Limited Edition). The problem here is that I write a ton of Windows Services and I can't see how to setup InstallShield LE. It appears that we (my company) will have to invest in licenses for the professional edition.

Has anyone found a way to install services in InstallShield LE? When using the Windows Installer project, you just set the custom actions.

like image 227
fizch Avatar asked Aug 16 '12 20:08

fizch


People also ask

How do I create an MSI for Windows application?

Go to Extensions > Manage Extensions > Online > Search, find, download and install Microsoft Visual Studio Installer Projects extension. 2). Add a new Setup Project in your solution > right-click Application Folder > Add > Project Output… > choose the corresponding Project > select Primary output > OK.

How do I create a MSI service?

Change the properties on each for what account you want your service to run under, what the service name is, description, etc. Then, in your MSI project, click on the Custom Actions Editor icon and add the "Primary output from YourServiceProject" to all of the actions, Install, Commit, Rollback, and Uninstall.


3 Answers

For Visual Studio 2012 & InstallShield LE, do the following:

  • Run through the InstallShield project assistant and add the primary output of your service to the Application files section.
  • After you are done with the project assistant, double click the "Files" item under step two of the setup project.

Files section

  • Right click on the primary output of your service, and go to properties.
  • Click the "COM and .NET Settings" tab, and place a check in the "Installer Class" checkbox. enter image description here
  • Click Ok

Now, once you build and run your install, your service will show up in the Windows Services snap in.

Note that this assumes you added a "Project Installer" to your service project (Right click on the service design sheet and click "add installer"). I can confirm this work on Windows 8 with Visual Studio 2012 / InstallShield LE.

like image 146
Mongo Avatar answered Oct 17 '22 04:10

Mongo


I've recently installed VS 2012 with Install Shield LE. At first I kept getting a ISEXP -5036 internal server error after a build (this was after setting up a ISLE project and running through the Install Shield Project Assistant). Eventually I found out that it was trying to create the MSI in the DVD-5 media type which is where it was failing. For some reason, creating the solution again from scratch somehow recognizes to only build to the CD_ROM and SingleImage media types which works.

Anyway to rectify the 5036 error, click the Build tab in VS 2012 (top menu), select configuration manager and you should see that your IS setup file is selected on the DVD-5 configuration. Change this to CD_ROM and click close. Once you build/rebuild it will complete with no IS 5036 error.

enter image description here

like image 24
Jonty Avatar answered Oct 17 '22 02:10

Jonty


While using the installer class checkbox may work for some instances, you may experience the following error:

Error 1001.The specified service already exists

Here is an excerpt from this link on how to resolve this issue:

For Error: Error 1001.The specified service already exists

This error will occur if the component installing a .NET Service is incorrectly configured with ".NET Installer Class" set to Yes. The method to install a .NET Service is to use Component\Advanced Settings\Services view, not the ".NET Installer Class" setting. Making definitions in the Component\Advanced Settings\Services view creates entries in the Windows Installer ServiceControl and ServiceInstall Tables. These entries are used by the Windows Installer "InstallServices" action to install the Service.

like image 6
ElHaix Avatar answered Oct 17 '22 03:10

ElHaix