Token identification

D

DBC User

I would like to write a program that needs to do the following;

1. This program will be launched from another program. (I have that
one ready)
2. This program when launched, should display which token this program
is launched (like administrative token or standard user token).
3. I also want to know the integrity level in which it is running.

Is it possible to do this in c#?

Thanks.
 
W

Willy Denoyette [MVP]

DBC User said:
I would like to write a program that needs to do the following;

1. This program will be launched from another program. (I have that
one ready)
2. This program when launched, should display which token this program
is launched (like administrative token or standard user token).
3. I also want to know the integrity level in which it is running.

Is it possible to do this in c#?

Thanks.


Nothing in the Framework to do this, which means that you will have to call
Win32 API "GetTokenInformation" using PInvoke, passing one of the
TOKEN_INFORMATION_CLASS enum values depending on the attributes you want to
retrieve from the user token.

Willy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top