Solved

Programmatically Log In to Windows XP

Posted on 2004-09-12
8
1,889 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 250 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 250 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
length of the password hash sha1:64000 to set sql field property. 13 104
How can I do Unit Testing with Session ? 1 38
C# XML Get Values 4 46
Selenium and Xpath 4 62
Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

740 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