Install Windows service with user's credentials as logon account

Is there a way to set the logon account credentials when installing the Windows client service? Right now, if I install the service with vhui64.exe -b, it makes the logon account Local System. This makes it so users that use a device from this client show up as "SYSTEM", instead of their username. Also, if multiple people are using a Windows service client, the ClientIdMap parameter won't work because they will all have the same name (SYSTEM). I've tried using RunAs to make sure vhui64.exe was running as the current user, but it still makes the client show up as SYSTEM.

Am I missing something? Or is this functionality able to be added?

thank you

#2

Actually a service usually logs in as someone or the system account. Its generally not something that changes often or at all really..

To change who the service logs in as, go to windows service manager, stop the service (its ok if it said it stopped abruptly) and then go to the log on tab and then change the account there.

#3

I agree with everything that you said here, but my issue is the fact that the service does indeed logon using the system account. This makes it so that the client's username is SYSTEM (this is the name that other clients see when a device is used). I was hoping to have the ability to set the logon account upon installation of the service, so that each user doesn't have to manually go to Services and change the logon account (this is the only way I've managed to change the username from SYSTEM to the user's actual username).

#4

You need write something like a powershell script you can run to stop the service, change the logon credentials and start the service