Installing windows service on Windows 10 Pro using InstallUtil.exe: The account name is invalid or does not exist RRS feed

  • Question

  • I'm trying to install a windows service on my Windows 10 Pro computer and am getting the exception:

    System.ComponentModel.Win32Exception: The account name is invalid or does not exist, or the password is invalid for the account name specified

    Everything works fine when I install in on the server which prompts us for a user name and password.  On Windows Server the syntax for the user name is:  ".\AdminName".

    On Windows 10 I tried "MyUserName" and ".\MyUserName", and both failed.

    What do I need to do to install this on windows 10?  Thank you.

    Thursday, August 3, 2017 6:15 AM


  • OK I found a work-around:

    In the service project in Visual Studio:

    1) Open the installer in the designer

    2) Right click on "serviceProcessInstaller1" and select properties

    3) For the property "Account", change from "User" to "LocalSystem"

    Now I'm not prompted for credentials and the service installs

    • Marked as answer by moondaddy Thursday, August 3, 2017 6:32 AM
    Thursday, August 3, 2017 6:32 AM