Windows 8.1 necessary. It is necessary for the program to complete the session under the user under which it is located and logged into the system under another in order to further perform some actions.

Administrator rights to the program are available if that. Users and passwords are also known naturally.

How can this be implemented under .NET ?

  • You will not be able to log in with another user. If you need to perform some actions, you can run processes on behalf of another user. - Zergatul
  • No, you just need to log out and log in as another user, launching on behalf of another user will give a completely different result. - Dmitry Nail
  • Logout will complete your application - Andrey NOP
  • @ АндрейNOP This statement applies to any type of program? Or is it a particular to .NET? Maybe then I should look towards C ++? - Dmitry Gvozd
  • one

1 answer 1

You can implement it. You should write a Windows service, give it the appropriate rights, make sure that it is added to autoload, and then when it starts up with sufficient access rights, it can initiate the session entry. On account of the implementation, as correctly suggested in the comments, see here . But I think taking into account the specifics of the task, you will have to "dance a little with the tambourine" service loader. That the service did not interrupt the work.