Archive: How to find current user?


How to find current user?
Hi,

I am trying to register a new service using the servicelib, however it requires a user and password for the create action.

How do I find those?

This is a silent install so I just want to create the service using the current users priviledges.

Nniol


To get the current user, you can use the UserInfo plug-in. But that'd require the user's password as well and you can't get that in a silent installer. You'd probably want to run the service with the SYSTEM user anyway and not the current user.