Solved

Programmatically Log In to Windows XP

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C# Json POSt to Rest API 4 60
Reset asp.net login password 4 42
Install Problem 13 29
How can my static class become undefined?? 8 47
In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

785 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