One of my recent SOE design project had a requirement of customising the user logon screen to display the company logo.
The image is set to dontdisplaylastusername in the registry.
Which means, every time a user logs off or restarts the PC they need to enter the username and password. Because of dontdisplaylastusername setting we will get a blank square box above the username field instead of a profile picture on the logon screen. Now, I need to find a solution to fill that blank square box with company logo.
Basically this is what we need to achieve;
I thought it must be easy but always ended up getting a blank black screen without CTRL + ALT + DEL.
Well once you have right tools and right info, it will take 15 min. to get the solution in place.
First – get the tools;
- Get the desired image
- Download a resource editor
- Download a image editor
- WinPE USB drive
WARNING: This article is for IT professionals or at least advanced end users who will know how to restore their machines without wiping whole machine and losing whole data. If the settings configured incorrectly, you won’t be able to login back to your machine.
Tools and usage:
Authui.dll file controls the login screen interface. Authui.dll file is located under C:\Windows\System32\ All the images are embedded into this dll file. We need to replace the default blank square image with a custom image using a resource editor.
So download a resource editor. I prefer using Resource Hacker (http://www.angusj.com/resourcehacker/ ). Resource hacker adds a context menu with right click and also gives an option to ‘replace image’ option when we open the authui.dll file.
Next is to download an image editor.
The custom image which we use to replace the existing image should be ;
- A .bmp (bitmap) image
- Width and Height 190 x 190
- Image depth 32 bpp
If we missing any one of the above specifications, the logon screen fail to load, then will end up with black screen without CTRL + ALT + DEL.
To edit my custom image I have used Pixelformer (http://www.qualibyte.com/pixelformer/ )
Using winPE USB drive is optional but I highly recommend it. Using WinPE replaces the steps where you need to take ownership of the authui.dll file. If you want to edit the authui.dll file in windows, you need to take ownership of the file then copy into a different location. If you use WinPE USB drive, we don’t have to take ownership of the file, also if something goes wrong we can replace the original file back.
How to do:
First Step:Prepare your custom image using Pixelformer. If the image is in different format and size, make sure it is in a .bmp format with 190 x 190 size and with 32 bit depth.
We need to copy the authui.dll file from the local machine to WinPE USB drive.
Boot the machine into WinPE using WinPE USB drive. Run the following command;
Copy C:\Windows\System32\authui.dll D:\
(Assuming D:\ is your USB drive letter. Replace this with correct drive letter)
Copy the authui.dll file to the computer where you have installed Resource hacker and Pixelformer.
Right click on the authui.dll file then choose Open using Resource Hacker
Then look for 12223;then expand 12223;
Then select 1033
The 1033 image should display as below
Click on File with new bitmap and browse to the location where bitmap is located, then click on Replace. This will replace the empty square box with the custom image which we have just created.
Now it is time to save the changes to the modified authui.dll by going File then Save in Resource Editor.
You have a custom authui.dll ready to be copied over to the windows machines C:\Windows\System32 folder.
Copy the custom authui.dll to the WinPE USB drive. Reboot the test machine into WinPE.
First delete the existing authui.dll file from the windows machine by typing following command in WinPE;
Then copy the modified authui.dll file to C:\Windows\System32 by typing following command;
Copy D:\authui.dll C:\Windows\System32\
(Assuming D:\ is your USB drive letter. Replace this with correct drive letter) Remove the USB drive then restart the PC.
If you have done everything correct, you should see the custom image on the logon screen as below;