System.UnauthorizedAccessException: Attempted to perform an 'An exception occured during the Install phase. Things start off smoothly, but then I get a message: I open up command prompt (run as administrator) and I do For serviceProcessInstaller1, I set the account to LocalSystem. I then added the installer via Right Click > Add Installer. I created a new Project in Visual Studio 2017 using the Windows Service (.NET Framework) template under Visual C# > Windows Desktop. Right now, I don't even have anything in my service, I just want to be able to install the service. So I am trying to create a service using C# in Visual Studio 2017 and I keep getting an error when I try to install it.