1

We are working on a windows 8 native application that will need a feature to switch between an administrator account and an less privileged account and then back again. Assuming we have the credentials (user and password), is this possible programmatically - using a combination of a front-end (WPF) app and a background service?

Here are few links which we are looking into. We have already looked into it, just want to see if anything new for windows 8: C# - Programmatically Log-off and Log-on a user

Also, we are referring to the following system library call: https://msdn.microsoft.com/en-us/library/windows/desktop/aa378184%28v=vs.85%29.aspx

Any ideas/suggestions will be appreciable.

Community
  • 1
  • 1
sandeep
  • 149
  • 1
  • 12
  • Do you need the entire windows environment to be logged into another user account or just access file/folders/network with different credentials? – Bernd Linde Mar 26 '15 at 15:05
  • It will be great if we can log into another user account. We are looking into impersonation as well. – sandeep Mar 27 '15 at 02:57
  • You should expand on what is your end goal. Switching accounts isn't usually necessary for anything, as impersonation is the correct route to working between accounts. – Matt Small Apr 08 '15 at 17:04
  • @sandeep have you ever found a way to do this programatically? I'm looking for a way to programatically switch from Restricted user to Administrator account from Service (that runs under system account, all credentials are available for use). We're making an image restore with pxe in couple weeks, and need to go to admin on over 170 touch capable pcs running W7 to set up IPs and EWF, would come handy if I could switch users via service so that I can switch them all at once and discard the need of connecting a keyboard to all of them. Thanks in advance. – That Marc May 26 '20 at 01:23

0 Answers0