RE: Installing WindowsService to system without Visual Studio Tool

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Steven

Thank you for an excellent answer. I'm sure this will work perfect.
I also found that in Windows 2003 Resource Kit was the program instsrv.exe
,which take care of business in a snapp without complex setup programs.

So, for my production machine, which is a Windows 2003 Server, it worked well.

Best Regards
--
Peter Karlström
Midrange AB
Sweden


"Steven Cheng [MSFT]" wrote:

Hi Peter,

From your description, you've built a .NET windows service project and can
use installUtil.exe to install it in dev environment. You're wondering how
to get it installed in product environment where the InstallUtil Command
tool is not available, correct?

Based on my research, for .NET windows service project, it can be deployed
via the setup project(just like all other kind of projects). If your sevice
project is installable via InstallUtil, then, you do not need to change it.
What you need is an additional Setup project for your service projecct's
deployment.

The following msdn reference mentioned general info of creating setup
project and use installer class (in custom action ) for install.

#How to: Install and Uninstall Services
http://msdn.microsoft.com/en-us/library/sd8zc8ha(VS.80).aspx

#Walkthrough: Creating a Custom Action
http://msdn.microsoft.com/en-us/library/d9k65z2d(VS.80).aspx

For your case, here is the main steps you need to do for creating the setup
project:

1. Create a standard setup project in Visual studio(2005 or 2008)

2. Add files into setup project from your windows service project(via
"Primary project output")

3. Add a custom Action for the setup project, and choose the "primary
project output" you added previously

4. Make sure you set "InstallerClass" to true , so that the setup project
will automatically use the "Installer" class(you've already created in the
windows service project to install the service.

For more detailed info, here is a dedicated knowledge base article about
creating setup project for windows service:

#How to create a Setup project for a Windows Service in Visual Basic .NET
or in Visual Basic 2005
http://support.microsoft.com/kb/317421

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: =?Utf-8?B?UGV0ZXIgS2FybHN0csO2bQ==?= <HayRoller@xxxxxxxxxxxxxxxx>
Subject: Installing WindowsService to system without Visual Studio Tools
Date: Thu, 3 Jul 2008 08:05:00 -0700


Hi

I have made a Windows Service in Visual Studio 2005.
The service is tested in my developer machine and all works fine.
Now I'm ready to install it on my server.
How do I install this service on the server since Visual Studio Tools and
InstallUtil not is installed there?

--
Peter Karlström
Midrange AB
Sweden



.



Relevant Pages

  • RE: Help me choose setup method
    ... projectand windows service application... ... setup package via platform installer sdk utilities: ... ** For setup projects, Visual Studio 2005 provide both setup project types ... You can also create a dedicated setup project for windows service: ...
    (microsoft.public.vsnet.general)
  • Re: New to windows services, cant get installer to work
    ... I've right clicked all over the place and I'm not seeing an "Install ... Start a new windows service project, just add your work code, do not include ... Now add a new project to your solution, of type "Setup project", right ... right click and select "Add custom action" then select ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Question about Windows Service and Setup projects
    ... 'configuring' a windows service, in the sense of passing it string values ... options within this same setup project, in order to update operating settings ... ServiceProcessInstaller) and will call the install methods of those classes ... Setup project for a Windows Service in Visual Basic .NET or in Visual ...
    (microsoft.public.dotnet.languages.vb)
  • Installation continues: install Acrobat Reader 7.0
    ... I continue installing; my production PC is Windows 2003; development ... I need install Acrobat Reader 7.0 in Windows 2003 using my Setup ... I need create my Setup Project for install AcrobatReader70setup.exe. ...
    (microsoft.public.dotnet.languages.csharp)
  • Install Acrobat Reader using Setup Project (MSI)
    ... I continue installing; my production PC is Windows 2003; development ... I need install Acrobat Reader 7.0 in Windows 2003 using my Setup ... I need create my Setup Project for install AcrobatReader70setup.exe. ...
    (microsoft.public.dotnet.languages.csharp)