Does Tentacle Service Need Elevated Permissions to Run installutil?

Hi Paul,

I’m re-tooling some older deployments to work with the new OctopusDeploy conventions. Particularly, I need to add a Deploy.ps1 that can install the Windows Service.

I’ve set up my Deploy.ps1 to do what you’ve outlined on your Installer Convention page. However, when I deploy the service, my PostDeploy script cannot find any Windows service with the expected name (it starts the service deployed in the Deploy.ps1 step). When it finds no service, it errors out and fails deployment.

Some notes that may provide clues:

  1. If I remote into the Tentacle machine and open a command window inside Octopus\Tentacle\Applications\MyService.version and run installutil MyService.exe, I get a permission error
  2. If I run the above command window as administrator and run installutil MyService.exe, it works.
  3. Tentacle service is currently running as “Local System”
  4. ExecutionPolicy on this box is “Unrestricted”

Do I need to run under a service account that has administrative privileges? Has anyone else been able to execute installutil without this change?

(There is scant little evidence of failure at the Deploy.ps1 layer. The failures in installutil leave no trace at all in the Tentacle log)

Thanks for your help,


Hi Seth,

InstallUtil ought to work under the Local System account - or at least it does on my test machines.

Attached is a sample package that I used.

To make the InstallUtil output appear, change the Deploy.ps1 script to look something like:

& (Join-Path $NetFrameworkDirectory "InstallUtil.exe") "path\to\my.dll" | Write-Host

Out of curiosity, what version of the .NET Framework is the target project built in? Octopus uses the .NET 4.0 x64 version on a 64 bit machine and x86 on a 32 bit machine. If this is an older project, I wonder if there is an incomparability there. Adding the | Write-Host command above should shed some light on the problem.


Forgot to attach :slight_smile:

Acme.Service.1.9.2.nupkg (33 KB)

First - your suggestions work. The project deploys just fine. I’ve even added the “pipe to write-host” to my other scripts. Great idea.

As to what changed, the first thing I noticed was that you provided your service name parameter to installutil as a string. E.g. installutil "ServiceName.exe where I was trying to call installutil ServiceName.exe. This could very well have been the root of the problem. Piping the output would have probably let me hone in on the problem sooner, but I’m learning.

To your other (probably obsolete by now) questions, I’m running this Tentacle with .NET 4.0 x64 on a VM running Windows Server 2008R2.

Again, thank you for your prompt assistance. We can close this thread.