?
Solved

Programmatically Log In to Windows XP

Posted on 2004-09-12
8
Medium Priority
?
1,892 Views
Last Modified: 2007-12-19
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
Comment
Question by:CJCraft
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
8 Comments
 
LVL 22

Expert Comment

by:cookre
ID: 12039831
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
 
LVL 7

Author Comment

by:CJCraft
ID: 12040257
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
 
LVL 18

Assisted Solution

by:armoghan
armoghan earned 1000 total points
ID: 12041220
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
 
LVL 22

Accepted Solution

by:
cookre earned 1000 total points
ID: 12041409
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
 
LVL 18

Expert Comment

by:armoghan
ID: 12295302
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question