Exit Posted September 4, 2015 Posted September 4, 2015 No luck in using search for switch user.I have two user accounts on a Win10 64bit PC and want to easily switch from one user to the other by a desktop Icon.I found a solution here , but it uses shutdown restart with registry tweaks.Is there a way to just Logout/Login ? Any ideas ?I will code myself, but some pointers are welcome. App: Au3toCmd UDF: _SingleScript()
computergroove Posted September 6, 2015 Posted September 6, 2015 Windows key + L might get you started. Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html
Exit Posted September 7, 2015 Author Posted September 7, 2015 Send() function does not accept WIN+LSee my script:; SwitchUser (work in progress) Send("#l") ; does NOT open "switch user" window, but types "l" at the current cursor location. ; Place cursor here --> <-- and press F5 App: Au3toCmd UDF: _SingleScript()
jguinch Posted September 7, 2015 Posted September 7, 2015 _WinAPI_LockWorkStation() can be used instead if #l, but this won't allow you to automate the user login.A way could be to apply an autologon (with autologon.exe : https://technet.microsoft.com/en-us/library/bb963905.aspx), but it requires a reboot to be effective. Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
Exit Posted September 7, 2015 Author Posted September 7, 2015 _WinAPI_LockWorkStation() can be used instead if #l, but this won't allow you to automate the user login.Confirmed. A way could be to apply an autologon (with autologon.exe : https://technet.microsoft.com/en-us/library/bb963905.aspx), but it requires a reboot to be effective.That is the same as my reference in first post.But I would like to preserve my first session and switch to the other session. And vice versa.Btw, this would be much faster than rebooting. Any ideas ? App: Au3toCmd UDF: _SingleScript()
kylomas Posted September 7, 2015 Posted September 7, 2015 Exit,I found this using "switch user programmatically win7" from Google. Hope it helps.kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill
Kashitriwedi Posted January 25, 2019 Posted January 25, 2019 If you are unable to switch users in windows 10 without restart, you can try command prompt to switch users. I can't say with confidence but may it can help you. Just open cmd and enter "runas /user:*computer name\*account name explorer.exe" and press enter. It will switch you in your account you entered. Source: https://windowsclassroom.com/how-to-switch-users-on-windows-10/
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now