Jump to content

Script to log in a user to windows


Recommended Posts

I have several suites of 30 or so PCs. When I install software on teh server I have eto test it on every PC, logged in as an admin user, a member of staff and as a student.

I want a script I can kick off remotely (using psexec or similar) that will fill in the username box, password and choose the correct domain and then click OK to log that user in.

I can log the users out "en masse" using psshutdown, what I can't do yet is log the users in.

It would be good for exams as well when staff can just run a script that logs in each of the Pcs in as a known exams user.

Any ideas?

CJ

Link to comment
Share on other sites

I have several suites of 30 or so PCs. When I install software on teh server I have eto test it on every PC, logged in as an admin user, a member of staff and as a student.

I want a script I can kick off remotely (using psexec or similar) that will fill in the username box, password and choose the correct domain and then click OK to log that user in.

I can log the users out "en masse" using psshutdown, what I can't do yet is log the users in.

It would be good for exams as well when staff can just run a script that logs in each of the Pcs in as a known exams user.

Any ideas?

CJ

I doesn't work that way.

You'll have to write to the AutoAdminLogon keys at HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon and then force a reboot. Also configure the user's login scripts to clean up those keys afterwards. Be sure to use temporary accounts because if anything goes wrong, the credential info could be left behind in plain text in the registry. (Which can also be cleaned up with remote registry access.)

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...