1

I have a basic application that runs in the tray, and I'd like to incorporate the Task Manager's switch user functionality into it. This will be used to switch between a local "regular" user and a domain admin, both of which are mine.

Basically, instead of bringing up Task Manager, going to Users, right clicking on a user and clicking Connect, I want to make the process more efficient by simply right clicking on my tray icon, hover Users and click on the user you want to connect to.

Obviously I'm not looking to bypass any credentials - upon clicking the user, ideally it'd invoke the same popup you get in Windows when it asks for that users password.

Is this even possible? It should be noted that the application itself is running as a domain admin.

Thanks in advance.

tgmatt
  • 115
  • 1
  • 5

1 Answers1

0

Simply pinvoke the LockWorkStation function.

Norbert Willhelm
  • 2,579
  • 1
  • 23
  • 33
  • That's just going to lock the workstation, though. Task Manager allows direct connection to other sessions on the machine, which is what I'd like to incorporate into my application. – tgmatt Aug 22 '15 at 13:26
  • That wasn't your initial question, was it? I am not able to answer that anymore :( – Norbert Willhelm Aug 22 '15 at 14:00