A Script to log in a user account
Hello,
I am trying to come up with a script that I can run so I can remotley have a generaic user account log into multiple machines in our domain so I can run certain scripts that will not run from ctrl+alt+del. I am relativly new to the scripting process so there may be a better way to do this that I do not know of. Thank you in advance.
Answers (3)
use the autologin keys and set a count key of number of time to autologin. You can push a batch or script with these commands:
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v AutoAdminLogon /d 1 /f
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v AutoLogonCount /t REG_DWORD /d 1 /f
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultDomainName /d DomainName /f
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultUserName /d DomainUser /f
start /wait reg.exe add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon" /v DefaultPassWord /d Password /f
shutdown -r -t 0 -f
I'm assuming you have either Windows 7 or Windos XP so...
For Windows 7
- Press the Windows key + R on your keyboard to launch the “Run” dialog box.
- Type in control userpasswords2
- Press Enter. The User Accounts window will display.
- Uncheck the option “Users must enter a user name and password to use this computer”
- Click “OK”
- You will then be prompted to enter the current password and confirm it.
- After doing so, you will no longer be prompted to enter your password upon login.
For Windows XP