Questions tagged [installutil]

The Installer tool is a command-line utility that allows you to install and uninstall server resources by executing the installer components in specified assemblies. This tool works in conjunction with classes in the System.Configuration.Install namespace.

This tool is automatically installed with Visual Studio and with the Windows SDK. To run the tool, you can use the Visual Studio Command Prompt or the Windows SDK Command Prompt (CMD Shell). These utilities enable you to run the tool easily, without navigating to the installation folder.

127 questions
167
votes
7 answers

Install a .NET windows service without InstallUtil.exe

I have a standard .NET windows service written in C#. Can it install itself without using InstallUtil? Should I use the service installer class? How should I use it? I want to be able to call the following: MyService.exe -install And it will have…
Yuval Peled
  • 4,988
  • 8
  • 30
  • 36
147
votes
8 answers

Install Windows Service created in Visual Studio

When I create a new Windows Service in Visual Studio 2010, I get the message stating to use InstallUtil and net start to run the service. I have tried the following steps: Create new project File -> New -> Project -> Windows Service Project Name:…
jkh
  • 3,618
  • 8
  • 38
  • 66
104
votes
10 answers

Installing multiple instances of the same windows service on a server

So we've produced a windows service to feed data to our client application and everything is going great. The client has come up with a fun configuration request that requires two instances of this service running on the same server and configured…
Switters
  • 1,553
  • 2
  • 12
  • 13
80
votes
13 answers

Cannot install windows service

I have created a very simple window service using visual studio 2010 and .NُET 4.0. This service has no functionality added from the default windows service project, other than an installer has been added. If I run "installutil.exe appName.exe" on…
Matthew Dalton
  • 911
  • 1
  • 7
  • 7
51
votes
5 answers

installing windows service with SC.exe or InstallUtil.exe - there is difference but which?

SC.exe and InstallUtil both install/uninstall windows services. But they don't seem to work the same way. What is the difference? For instance InstallUtil fails (some file or dependency not found error) while Sc create happily installs the…
LosManos
  • 7,195
  • 6
  • 56
  • 107
38
votes
5 answers

Installing a .NET service using InstallUtil

I'm trying to install a .NET service I wrote. As recommended by MSDN, I'm using InstallUtil. But I have missed how I can set the default service user on the command-line or even in the service itself. Now, when InstallUtil is run, it will display…
Karim
  • 18,347
  • 13
  • 61
  • 70
16
votes
3 answers

.net InstallUtil utility - 32 bit vs 64 bit

I've got a windows service compiled as AnyCPU. I'm trying to get it into our installer to distribute. However... I am unclear on the difference between the 32 bit and 64 bit versions of InstallUtil. Does anyone know what (if any) there are? On…
user199783
14
votes
2 answers

Using InstallUtil to install a Windows service with startup parameters

I am using InstallUtil to install my service and I just cannot figure out how to specify the startup parameters for it! Here is my Installer subclass: [RunInstaller(true)] public class ServerHostInstaller : Installer { private ServiceInstaller…
mark
  • 59,016
  • 79
  • 296
  • 580
13
votes
7 answers

C# Powershell snapin not registering using installutil

I've got a really simple powershell script (see below). I've got installutil aliased using the following in my profile: set-alias installutil $env:windir\Microsoft.NET\Framework\v2.0.50727\installutil In powershell I simply: installutil…
downatone
  • 1,936
  • 2
  • 23
  • 30
13
votes
2 answers

installing windows service error: cannot open service control manager on computer. this operation might require other privileges

i have windows 8 i have a windows application wrtitten with c# and on visual studio 2013 and want to install this application. i open command prompt write: c:\..\instalutil.exe c:\projectfolder\filename.exe after i run this code it give me the…
ercan
  • 825
  • 3
  • 16
  • 27
11
votes
3 answers

Correct InstallUtil Path To File Syntax?

I'm trying to install a Windows Service using a batch file, let's call it "installservice.bat". Inside the file I have the following commands: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe -i ".\MyService.exe" pause When I excute…
Mr. Smith
  • 5,489
  • 11
  • 44
  • 60
11
votes
4 answers

Installing Windows Service with batch file?

I have the following in a bat file : @ECHO OFF REM The following directory is for .NET 4.0 set DOTNETFX2=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319 set PATH=%PATH%;%DOTNETFX2% echo Installing IEPPAMS Win Service... echo…
Banshee
  • 15,376
  • 38
  • 128
  • 219
10
votes
2 answers

Problem installing windows service

I am having a problem installing a Windows service. I installed and uninstalled the service numerous times (installutil..... installutil /u) without any problem but something went wrong and now when I attempt to install, I get the error message…
user418676
  • 101
  • 1
  • 3
7
votes
2 answers

WCF Service as Windows Service woes (Windows 7)

I followed the steps here to make my existing WCF service (already working fine as console application) be Windows Service as well, on my Windows 7 machine which is also my development machine. No matter what I tried, when doing the last step of…
Shadow The GPT Wizard
  • 66,030
  • 26
  • 140
  • 208
7
votes
3 answers

How to run a task when a windows service starts?

I have a windows service and I've written the code to run the task within the OnStart() event: protected override void OnStart(string[] args) { this.DoTask(); } private void DoTask() { Task task1 =…
The Light
  • 26,341
  • 62
  • 176
  • 258
1
2 3
8 9