[python-win32] Automating logon/logoff
Matt Herbert (matherbe)
matherbe at cisco.com
Wed Oct 17 17:01:31 CEST 2007
Hello all,
I am stumped trying to figure out how I can automate the login/logoff
procedure on Windows. Here is what I know so far. First, I can logoff
the system pretty easily using win32api.ExitWindowsEx() function.
Second, I can auto logon the system (after a reboot) using the special
registry keys (DefaultUserName, DefaultPassword, DefaultDomain). Third,
I will have to wrap everything up in a service, so I can be running at
the desktop and the logon screen.
So the hard part that I can't figure out, is how do I programmatically
initiate a logon, after a logoff? Here is the rough sequence of events I
want to achieve:
1 MyPyService is running (at desktop)
2 User requests an automated test
3 MyPyService starts the test
4 MyPyService logs the user off
5 MyPyService wait's for something to happen
6 MyPyService logs a user on
Any hints or help on step 6 would be greatly appreciated
-Matt
More information about the python-win32
mailing list