Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1893
  • Last Modified:

Programmatically Log In to Windows XP

I would like to be able to programmatically log in to my Windows XP machine. For example, I'd like to write a program that would say at 7:55 AM the program would log in to my machine and I would see the desktop NOT the log on to windows dialog.

I need help with how do I do this and how do I do this with C# in .NET?
0
CJCraft
Asked:
CJCraft
  • 2
  • 2
2 Solutions
 
cookreCommented:
If it's just for you and you have a fairly recent BIOS, set the BIOS to boot at the specified time, then use TweakUI to do the auto logon.  Otherwise, the task scheduler would be the way to go:
http://www.experts-exchange.com/Security/Win_Security/Q_20918757.html
0
 
CJCraftAuthor Commented:
Thanks cookre,

Actually, the point of the program is to log in to the machine from a program.

Think of a USB token that you use connect to a PC then it autoruns an application that logs you on.

I want to write a program that will log on on for me in the same sense.
0
 
armoghanCommented:
Just a guess and a start
You can try making a windows service which runs at the back ground and send specific key strokes to the windows login screen
0
 
cookreCommented:
If the machine is off, you'll have to set a boot time in CMOS setup (if you have it).

If a user is already logged in, the service will have to do a logout, then an EnumDesktops to get a handle to the logon desktop, open the desktop then EnumDesktopWindows to get a handle to the logon window, from which you can use PostMessage to send keys to it.
0
 
armoghanCommented:
My Comment
You can try making a windows service which runs at the back ground and send specific key strokes to the windows login screen

Elaborated by cookre

If a user is already logged in, the service will have to do a logout, then an EnumDesktops to get a handle to the logon desktop, open the desktop then EnumDesktopWindows to get a handle to the logon window, from which you can use PostMessage to send keys to it.


Should I get some points ?
I would suggest a split
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now