Installing Windows Service

Hello. What is the process for getting the Windows Service installed? I’ve created a Windows Service project in VS2010, added a nuspec file and have created the nupkg with OctoPack, but when I deploy the package the service is not up and running. Looking at the log I can see the package being unpacked and no IIS web site found. Do I need to add a Deploy.ps1 that calls InstallUtil.exe?

Thanks in advance!

Hi Jason,

That’s correct, you’ll need a Deploy.ps1. Instead of calling InstallUtil, I like to use the script on this page:

The reason is that sc.exe allows you to reconfigure a service rather than uninstalling and reinstalling it via InstallUtil. There is a second script on that page which shows how to use InstallUtil if you prefer that.

Hope that helps,

Paul

Thank you. I’ve just about got it up and running. Is the idea to run the service directly in the Tentacle\Applications folder or do I copy the exe out somewhere else on the machine?

Thanks!
Jason.

Hi Jason,

I personally prefer to run the apps out of the default folder. You can however specify a Variable called OctopusPackageDirectoryPath see this page, which will trigger Tentacle to automatically copy the package contents to.

Note that if you are copying over an existing directory and the service is running, you’ll need to add a PreDeploy.ps1 to your project to stop the service (this script is run before copying).

Hope that helps,

Paul

Thanks for your help!

Jason.