Jump to content
Sign in to follow this  
Exit

How to switch user ?

Recommended Posts

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()                             

Share this post


Link to post
Share on other sites

Send() function does not accept WIN+L

See 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()                             

Share this post


Link to post
Share on other sites

_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.

 

Share this post


Link to post
Share on other sites

_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()                             

Share this post


Link to post
Share on other sites

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/

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By abberration
      Software Installer
      version 1.2 - Jan 2, 2021
      Hello, everyone!
      Today, I present to you a new version of Software Installer. This script is designed to be used on CDs/DVDs/USB drives where you put software in a folder (called Software) and you can select multiple software and it will automate installing your selected software one after another with little to no interaction. To do this, you simply need to configure each software with a silent switch (most software have one or more). You can put your software in categories to organize them on the main GUI.
      Screenshot:

      The major new things concerning this project:
      Added a Detect button, where the software tries to detect what kind of installer is used, saving you from having to find out on your own. It's not perfect, but it detects many common installer types. Added a Installers.db file for installers that were not created by the most common methods (Inno Setup, NSIS, etc). I will continue to add to this file. If you have any that you find that you would like to contribute, please PM. I would very much appreciate your help. This version searches for all subfolders now and shows .exe and .msi files that you may not want to see on the main screen. Therefore, I have added the option to "Hide This Item On Main GUI". Added the ability to install up to 2 software before and up to 2 software or registry entries after installing your selected software. This will allow you to install things like service packs, DotNet, etc. (prerequisites). And it will allow you to apply your licensing information through registry entries or patches/updates. If you want the full package (source code, compiled .exe (both 32/64 bit), changelog, installers.db, icon, etc.), you can download it here:
      https://www.filefactory.com/file/2o2enxmm73qo/Software_Installer_v.1.2.zip
      I have a lifetime account at FileFactory, so the link should never die and you do NOT need an account or pay them money to download. Simply choose the free/slow download option. The file is small and will still download fairly quickly. If you have trouble downloading it, PM me. I have the previous versions of this script, but they are inferior to this version, so if you want the older versions, PM me and I will provide them.
      If you just want the bare minimum, the script, installers.db and changelog are attached on this forum below.
      Enjoy!
      Software Installer.au3 Installers.db Changelog.pdf
    • By Skysnake
      From From here, bottom of the post
      I am not arguing the logic of this, merely would like to point out that if there is such a rule, it is not documented...  Are there other such rules?
      Skysnake
    • By VIP
      I can not do anything with any user in the "Local Users Group"
      I tried from my account but I could not change my password (ie set new password)!
      But I was able to activate the Administrator account and I logged into the Administrator account and still could not do anything with my account! But I can set the password and disable the Administrator account from my account or Administrator.
      Any ideas? (Ignore the click on the Sign-in option in the Change Accout settings.)
       

    • By FrancescoDiMuro
      Good morning guys
      How are you? Hope you're fine
      I'm doing some field checking...
      Can you suggest me something? Something like: If the user doesn't prompt anything in a field, MsgBox and focus on the "blank" field, else, keep up with the script.
      I thought on a nested If...Else, but I have something like 10+ edit to control...
      Thanks guys! 
      EDIT:
      And I would like to know either how to retrieve all listview item ( 2 columns ) from a ListView...
      Column A|Column B
      abcd         | 1234
      bcda         | 1432
      How can I retrieve an array with abcd|1234|bcda|1432 ?
      Thanks  
       
    • By WoodGrain
      Hi guys,
      Could someone please tell me what I'm doing wrong with this code?
      I'm trying to take user input and then run a function with the same name, but it's not calling the function.
      So in the below after pressing Shift+F8 I would enter the text (without quotes) "testFunc".
      As you can see I've also tried this with IF statements, I'm new to using Switch/Case.
      HotKeySet("+{F8}", RunManually) Func RunManually() ;Use a case statement with 1 hot key and an InputBox to manually run functions $funcName = InputBox("Which Func to Run?", "Enter the name of the function to run") MsgBox(0, "Entered value", $funcName) ;If $funcName = testFunc Then testFunc() ;If $funcName = test2Func Then test2Func() Switch $funcName Case testFunc MsgBox(0, "Calling", "Calling Function") testFunc() MsgBox(0, "Called", "Function call finished") Case test2Func MsgBox(0, "Calling", "Calling Function") test2Func() MsgBox(0, "Called", "Function call finished") EndSwitch EndFunc While 1 ;testFunc() Sleep(1000) WEnd Func testFunc() MsgBox(0, "func running", "Seems to work!") EndFunc Func test2Func() MsgBox(0, "func 2 running", "2 Seems to work!") EndFunc Thanks!
×
×
  • Create New...