-
January 13th, 2003, 12:02 AM
#1
Windows Event Listener
I am writing a program to auto fill in Windows Prompt. This program will run when start up Windows.
If Windows prompt for user id and password Then
Read c:\user.txt
If empty Then
Do nothing
Else
Read in the id & password
Fill in the id and password to the Windows Prompt
Submit
End If
Else
do nothing
End If
Could you advice me how to get started ?
Updated at 7:26PM Singapore Time :-
I find a freeware that is similar to my requirement.
(Push the Freakin' Button is a freeware, button pressing utility for use with Windows 95/98/ME, NT4 and Windows 2000. )
http://www.bobos.demon.co.uk/par/PTFB.htm
I wonder how this ptfb.exe receive the popup event ? (I mail the author a few days ago but not reply yet.)
Last edited by guojinwen; January 13th, 2003 at 06:26 AM.
-
January 13th, 2003, 12:56 AM
#2
you are almost figure it out....
you can find the login window and send messages to it..
That's it..
-
January 13th, 2003, 02:00 AM
#3
How to find the login window and send messages to it ? Which function to call ? Thanks.
-
January 13th, 2003, 02:13 AM
#4
enumwindows, findwindowEx.. etc.
i have not put my idea into codes, so i am afraid i cannot provide more details before i have implement such function..
If you have figure it out, let me share your joys.
-
January 13th, 2003, 02:33 AM
#5
I want the program to run upon user login till logoff, in this case, I got to write a infinite loop, inside the loop, I check if there is such logon prompt, if have, then process it, else, just keep on looping.
Is this conceptually correct to implement these type of application ?
-
January 13th, 2003, 02:47 AM
#6
The algorithm you've designed might work. The problem is when you're polling for a window to appear as you've designed is a poor choice. If you poll too often you're hosing up your system performance. If you poll too infrequently then the user waiting to auto login will be annoyed he has to wait longer than it would have taken him to type in his userid and login.
A better solution would be to just change the login on the box to default one user and then no fuss no muss you're set.
If you're dieing for a programming solution, the approach I've seen used in the past is to modify the registry to instantiate auto login. Here is a working example complete with code..
http://www.bbdsoft.com/downloads/msvc/alogin.zip
have fun..
-
January 13th, 2003, 02:48 AM
#7
IF you CAN let windows load your exe befere the logon dialog appears, in Win2k, you can do it. But i think this is another job.
Sometimes, SendMessage will fail if you have not privileges. Think like that if you can change the password automatically it also means you can get the password easily, the Windows have a BIG BUG and is vulnerable..
Isn't It? maybe i am wrong..
-
January 13th, 2003, 04:22 AM
#8
SendMessage wont work , because there is Desktop limitation. As logon window is in anather desktop (\WinSta0\WinLogon) that windows default desktop. If you send message the logon window will become visible on winlogon desktop not on interactive default desktop.
Regards,
Ramkrishna Pawar
-
January 13th, 2003, 06:23 AM
#9
I find a freeware that is similar to my requirement.
(Push the Freakin' Button is a freeware, button pressing utility for use with Windows 95/98/ME, NT4 and Windows 2000. )
http://www.bobos.demon.co.uk/par/PTFB.htm
I wonder how this ptfb.exe receive the popup event ? (I mail the author a few days ago but not reply yet.)
-
January 13th, 2003, 06:46 AM
#10
If you want something releted to windows auto login then ask for auto login , it can be done by setting few registry keys. The free ware you r showing is diff. functionality thing ,not autologin or releted to windows Logon procedure.
Regards,
Ramkrishna Pawar
-
January 13th, 2003, 07:00 AM
#11
What I want is to auto fill in a Windows Prompt, (user id & password prompt is just an example.), and auto click the OK buttom, not auto login. Sorry for any confusion caused.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|