Error in installing Windows service developed in .NET

If the account is a local user account, try to use .\username when installutil prompts for the username and password.

The .\ stands for local machine.

Services require a fully qualified username (with domain), so when installing you need to be explicit about local user accounts.


The account may also need to be given the "Log on as a service" account right; pass the SE_SERVICE_LOGON_NAME constant to the LsaAddAccountRights() API.