I created the Windows C # service and its accompanying Visual Studio installation project, which the installer creates. It successfully installs the service.
When I select any value from the ServiceAccount enumeration except ServiceAccount.User , the service is installed without a request using the appropriate built-in user. What I find actually installs the service under the current user credentials . When I specify ServiceAccount.User , I get a prompt for the username and password during installation. I need to find a way to install the service with the credentials of a user that runs the setup without asking for a password.
Is it possible? I am ready to resort to any necessary measures (for example, P / Invoke loads) to get the job done.
source share