Switch User Script RRS feed

  • Question

  • Hi Guys, 

    I want to bother you with a help. I'm want to build a script for loging an user domain in background, I don't to stop the work for the user logedd or use "swtich user", i just wanna login with another account in the same PC just click a .bat. Does't no matter if the batch ask a password. 

    This is becouse I want to charge the user account with her domain policys but without disonect the actual user in the machine. 

    I tryed using a "runas /domain\user explorer.exe" but it only create a explorer process and after is closed. I want to charge a new user in background with the all process for this user and I want this new user stay disconect until its use is required and after use the switch user.

    Thanks for your Help

    Oscar G. 

    Oscar G

    Tuesday, June 23, 2020 11:56 PM

All replies

  • Hi,

    i dont understand, can you explain what you want to do exactely ?


    Wednesday, June 24, 2020 12:05 AM
  • Hi Oscar

    For script related question, you’d better ask for help from scripting forum.

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn. 

    Thanks for your understanding and cooperating.

    "Windows 10 Installation, Setup, and Deployment" forum will be migrating to a new home on Microsoft Q&A (Preview)!
    We invite you to post new questions in the "Windows 10 Installation, Setup, and Deployment" forum’s new home on Microsoft Q&A (Preview)!
    For more information, please refer to the sticky post.

    Wednesday, June 24, 2020 1:59 AM
  • Hi Teemo

    Thanks for your answer, it's for windows 10, It's not necesary a script, it could be just a comand line for me :) 


    Oscar G

    Oscar G

    Wednesday, June 24, 2020 4:04 AM
  • Hi M Dakhama

    Sorry for my english. Spanish is my languaje. Well my friend, i want to start a new session (Domain user) in background with a command line or script in the same PC but the first or current session does not must to be logged off or lock on until i want to use "Switch user". It is just to don't affect the work for the firset or current user. 


    Lo que sucede es que tengo un usuario logeado en el equipo y quiero que con un script o linea de comandos inicie la sesion de un segundo usuario (una cuenta de dominio) en segundo plano, sin afectar la sesión del usuario1 logeado en el equipo. Cuando ya el usuario1 haya finalizado su trabajo ya se podría cambiar de usuario y la sesion del usuario2 y esta ya estaría cargada. 

    Thank you for All,

    Oscar G. 

    Oscar G

    Wednesday, June 24, 2020 4:15 AM