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


Need program to run concurrently with windows login screen

Posted on 2004-09-23
Medium Priority
Last Modified: 2010-04-17
Windows XP system on win2k3 domain -

How would I go about creating and running an application that would display a button on the windows login screen that would allow users to automatically login to the system using a precreated domain account.  I need this app to run concurrently with the windows login in such a way that users can either enter correct credentials or press a button to have the system log itself in without the user needing to know a valid domain username and password.
Question by:baal32

Expert Comment

ID: 12136773
Isn't the easier thing to turn off entering user and password at logon and assume default ?

Expert Comment

ID: 12139841
Theoretically you would create an app that you would run as service. This way no user needs to be logged on; if the computer's running the services are running (if everythings ok that is ;-) ).

This app should then check if logon.scr (the logon-screensaver app) is running. If so add a form containing a loginbutton to the apropriate desktop. If this button is clicked you could use a sendkey's function (te emulate a user typing on a keyboard) to provide logon information or even logon directly using some api-function or something?

But maby you could alter the logon.scr or write your own logon window.

Hope this inspires others.

Expert Comment

ID: 12144675
I dont think it would be that easy. The desktop that runs logon dialog is designed to be a secure desktop basically to stop keyloggers capturing the username/password.   after saying that i found a site showing a way to do this in windows 2000 a while back, but i dont think it still works on xp.    

For the sendkeys idea to work your program would have to be running from the same desktop as winlogon.exe.

Your other alternative is to create a custom Gina.dll which ive done for windows 2000.  The problem with this for xp is  you lose some of the xp winlogon functions., like fast user switching.  

Hope this helps.

Author Comment

ID: 12146250
Seitou - fast user switching isn't a big deal anyway as these systems are one the domain.  I'm pretty clueless, so when you say that the app would need to run from the same desktop as winlogon.exe what does that mean exactly?

Accepted Solution

seitou earned 2000 total points
ID: 12161354
right, when windows starts it creates three unique desktops, one is the one you will be used to thinking of as your desktop, the one that runs you applications and whatever else you do while using the computer, the second is the screensaver desktop, (pretty self explanitory) and the third is the Winlogon desktop.  That is the one that the logon screen runs on. so its the one you are interested in.
there is a bit more information here.

Now for you to simply put a button on the logon screen it may be possible by some sort of system hook to change the default windows logon screen.  But i dont know anymore about that line of things.  

Now, if you want to go with the option of creating the custom gina its not too big a job, the msgina.dll file does not have to be completely rewritten, you can make a dll stub file which means you only have to write code for what you want to change and leave the rest intact.  unfortunately for changing the dialog this means making your own logon dialog box from scratch.  I did not find a way to incorporate the original.
There is more information here about both winlogon and gina.

If you want to continue with this route let me know and i will see what i can do to help, but first may i suggest a much easier solution that would seem to me to work fine.  there are keys in the registry called, LegalNoticeText and LegalNoticeCaption they can be used to pop up a message to the user before they logon (after the press ctrl - alt - del).  You could use this box to explain to  users without a username/password that a guest account has been created and they can use that by simply typing guest?

Let me know how you want to continue, i will do my best to help.


Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

916 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