Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > How do I start Windows service from VS2005 Setup/Install project
 

How do I start Windows service from VS2005 Setup/Install project

Hi!

I would like to know how to start a Windows service from the Visual Studio 2005 Beta Setup/Install project.

So far, I have been able to successfully generate the .msi and setup.exe files. My software installs properly on the target machine ... all the files are installed where they need to be and all registry values are created properly. But during installation, I need to start my own Windows service and this is where I have gotten stuck.

I have been using Installshield for a long time to create my install/setup files. But I am trying to move away from installshield and use VS2005 to get the job done.

Hopefully someone in this forum will be able to help me.

Thanks in advance!

Esrar Chowdhury  Wednesday, June 22, 2005 4:04 PM
Hope this helps!

Working with Windows Service Using Visual Studio 2005

VB: http://support.microsoft.com/kb/317421
C#: http://support.microsoft.com/kb/816169

DesiGUY  Wednesday, April 23, 2008 5:23 PM

InstallShield setups usually use the built-in MSI support for Services (ServiceInstall and ServiceControl tables) with IDE support. Visual Studio setups don't - they use Installer classes. That means there'll be custom actions that install and uninstall the services, and you'll need to write code to start the service at then of the Install method (or in the AfterInstall event handler) to use the ServiceController class to start it.

PhilWilson  Wednesday, April 23, 2008 6:28 PM

You can use google to search for other answers

Custom Search

More Threads

• Clickonce application failing interminently "Value does not fall within the expected range."
• SCE starter kit bootstrapper for .net framework 3.5
• Transitive Property
• Creating installer for my program?
• Install Content Files In A Directory Structure
• VS 2005 Setup Project- Display files during installation
• Error 1001: specified service already exists - during service application upgrade
• Everytime when app updated I click button <Unblock>
• Uninstalling Desktop Icons
• ClickOnce and SDM files