I used C # To create a Windows ServiceProgramAnd a project installer is created. Then generate the executable file of the service program and install it.
When you use installutil.exe for installation, you are prompted to enter the user name and password. I entered the username and password of my administrator.
After that, even if you switch to the adminitrator user, restart and reinstall the instance, you also need to enter the user name and password. The result is still incorrect.
The following is a prompt message. Let's see why. Thank you!
Found. NET Framework Version 2.0.50727
Installing Service "myservices.exe"
Microsoft (R). Net Framework installation utility version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
Running a transacted installation.
Beginning the install phase of the installation.
See the contents of the log file for the c: \ Program Files \ tech \ ts. Services \ myser
Vices.exe assembly's progress.
The file is located at c: \ Program Files \ tech \ ts. Services \ myservices. installlog.
Installing Assembly 'C: \ Program Files \ tech \ ts. Services \ myservices.exe '.
Affected parameters are:
Logtoconsole =
Assemblypath = c: \ Program Files \ tech \ ts. Services \ myservices.exe
Logfile = c: \ Program Files \ tech \ ts. Services \ myservices. installlog
An exception occurred during the install phase.
System. componentmodel. win32exception: No mapping between account names and secur
Ity IDS was done
The rollback phase of the installation is beginning.
See the contents of the log file for the c: \ Program Files \ tech \ ts. Services \ myser
Vices.exe assembly's progress.
The file is located at c: \ Program Files \ tech \ ts. Services \ myservices. installlog.
Rolling back assembly 'C: \ Program Files \ tech \ ts. Services \ myservices.exe '.
Affected parameters are:
Logtoconsole =
Assemblypath = c: \ Program Files \ tech \ ts. Services \ myservices.exe
Logfile = c: \ Program Files \ tech \ ts. Services \ myservices. installlog
The rollback phase completed successfully.
The transacted install has completed.
The Installation failed, and the rollback has been completed MED.
Done !!!
Press any key to continue...