You develop a service application that needs to be deployed.
Your network administrator creates a specific user account for your service application.
You need to configure your service application to run in the context of this specific user account.
What should you do?
A.
Prior to installation, set the StartType property of the ServiceInstaller class.
B.
Prior to installation, set the Account, Username, and Password properties of the ServiceProcessInstaller class.
C.
Use the CONFIG option of the net.exe command-line tool to install the service.
D.
Use the installutil.exe command-line tool to install the service.
Explanation:
The ServiceProcessInstaller class is automatically called during installation. It is the ideal place to specify the default service settings such as account credentials.
ServiceInstaller.StartType controls how the service will start up e.g automatically or manually. It has nothing to do with a specific account.
Net.exe with the config option is used to configure the server or workstation services.
Installutil.exe can be used to install the service but it is not possible to specify or override service account credentials.
They have to be specified in the ServiceProcessInstaller class.
I choose B