Accessing the current logon information for a windows service
From: Reddog (reddogaw_at_hotmail.com)
Date: 02/27/04
- Previous message: Michel Gallant: "Re: programmatically checking that assembly is authenticode signed?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 26 Feb 2004 22:08:53 -0800
I want to be able to query the current logon details for a windows
service. That is, i want to get a handle (or even the
username/password) for the account that a service runs under. How can
this be done?
The reason for this is that we have our application running as a
service. We also have another exe for the settings and configuration
of our service (including start, stop, pause, etc). We also have a
number of diagnostic functions that can be run from the interface and
a number of these require permissions to the server. So we want the UI
to impersonate the user the service is running under. I have the
impersonation functionality but not the ability to get the user handle
it needs to impersonate.
We also already have the functionality to change the credentials of
the service (using interop).
All help appreciated.
Andrew.
www.ssw.com.au
- Previous message: Michel Gallant: "Re: programmatically checking that assembly is authenticode signed?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|