Click here to Skip to main content
15,940,550 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi CP Experts

I have a windows service project built in .NET 3.5. I have also created a installer for it. Installing the service using the command 'installutil' or the setup.msi project installs the service successfully.

By default any windows service is installed in "C:\Program Files (x86)\Microsoft\Service" folder. However I want to install the windows service in my own directory like "C:\MyProjectServices\Service1.exe".

I tried the option to change the Publish URL using this path
Right Click on WindowsServiceProject > Publish Tab > Installation Folder URL > Browse button.
It allows me to browse to a local folder but gives me error message when I select the folder.

The error message is --
Microsoft Visual Studio

The string must be a fully qualified URL or UNC path, for example "" or "\\server\myapplication".

From this error message I can understand that the service is expecting a relative path or URL and not a hardcoded or absolute path.

However I would request the confirmation for this issue from the CP experts whether it is possible to install the windows service on a custom path/directory.
Updated 23-Apr-12 2:54am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900