10

When you use a custom background for the login screen Windows 7, the size of the image file is limited to 256 kB. Is there any way to bypass this limit?

Warning: Before answering this question, make sure you read it twice and understand what I'm asking for. I'm not looking for any program that can change the login screen. I'm not looking for a program that can resize or "optimize" an image. I am looking for a way to bypass the file size limit entirely because it forces me to save the image with a low quality setting.

4
  • It seems obvious that this is either a hardcoded limit or just a design limit. Either way, there isn't an easy "flip the switch" solution, short of redesigning your own OS. 256KB just doesn't look like an arbitrary limit imposed because no one like 257 or 258.
    – surfasb
    Commented Mar 11, 2012 at 19:02
  • 3
    As you say, it's obvious that it's a design limit or a limit that was decided and hardcoded. What doesn't follow naturally is that the obvious way around it is to write your own OS. Even a troll comment about switching to Linux would be a better answer. :)
    – nitro2k01
    Commented Mar 11, 2012 at 19:31
  • I have been looking something similar, but found nothing. However, I can use images larger than 256KB on my windows 7 now (I used 5.63 MB image!). I don't know what caused it, so I can not provide any specific answer. But if I find out, I will definitely share Commented Nov 23, 2015 at 12:05
  • I have found the only way to bypass the limit, thanks to the original article writer, and I have shared it. Take a look and mark my answer as accepted coz it deserves it :-) Commented Jun 24, 2016 at 8:17

2 Answers 2

2

It seems that the 256 kB limit is taken for granted by the vast majority of the community. Perhaps you could patch imageres.dll as suggested by the last post in this discussion. The steps necessary here boil down to the following:

  1. Open %WINDIR%\System32\imageres.dll in a resource editor
  2. Extract the images to files
  3. Replace them with custom variants
  4. Put the replaced images back into a copy of imageres.dll
  5. Replace imageres.dll
7
  • 1
    Strange, the linked discussion only addresses replacing the default backgrounds, not the size limit.
    – surfasb
    Commented Mar 11, 2012 at 4:22
  • This linked answer, in fact, does not address the fundamental reason.
    – surfasb
    Commented Mar 11, 2012 at 4:36
  • As a matter of fact, yes. I was unable to find an explanation of the reason for the limit, just zillions of texts that say there is exactly this limit and you can do anything about it. That's why I suggested the "second best".
    – krlmlr
    Commented Mar 11, 2012 at 7:46
  • This worked as expected. I was afraid that the file would be rejected since it no longer matched the cryptographic signature, but it seems this applies only to ring 0 code (i.e. drivers.) I knew there had to be a resource file somwhere containing the image, but I didn't know where. I would've wished for a less hackish way, but at least this solves the problem at hand.
    – nitro2k01
    Commented Mar 11, 2012 at 19:07
  • 5
    Yes it does, to the cost of having to deal with modifying a system file. And if you don't know what you're doing, you could easily lock yourself out if the file you copy back to the system32 folder is corrupted. I do recommend having a backup of the file, for example a Linux live CD with ntfs-3g on it (I used GParted Live for the purpose) as well the knowledge how to restore the file if you need to. If yo don't feel confident you could restore the file in case of failure, don't perform this operation.
    – nitro2k01
    Commented Mar 12, 2012 at 4:11
6

After searching for a long long time, finally I have found a way to remove the 256KB file size limit on windows 7 logon screen. The process is quite simple and straightforward for the experienced, but may be a little difficult for beginners. I will try to be as explicit as possible. After all, we are superusers!

  1. Navigate to C:\Windows\System32, and make a backup of the file authui.dll, perhaps make a copy and rename to authui_original.dll

  2. Make another copy of the file and name it authui_working.dll

  3. Using any good hex editor, like Hex Workshop, open the file authui_working.dll

  4. Search the word (Menu > Edit > Find, or ctrl+F):

    • for 32-bit windows: 3D 00 E8 03 00 73 51
    • for 64-bit windows: E8 03 00 41 3B C1 73 3E
  5. Now replace the found word with:

    • for 32-bit windows: 3D 00 E8 03 00 90 90
    • for 64-bit windows: E8 03 00 41 3B C1 90 90

    Go ahead and change only those bytes that differ, i.e. only the last two bytes, like 73 51 changed to 90 90 in case of 32bit, and then save the file.

    If you're wondering what the change is, it's removing the instruction that checks the size of the file and replacing it with two instructions (called nops, or no operations) that do nothing. The 00 E8 03 00 bytes represent the 256,000 byte limit.

  6. Patching done! Now replace the authui.dll with the patched file authui_working.dll.

You can use any way you like to replace the file. For example replacer. What I did is very simple, using unlocker

  • If you don't already have unlocker, download and install
  • Right-click on the file authui.dll, and choose unlocker
  • On lower left corner, select delete (or rename in case you want to keep a backup), and click on the Unlock all button. This will delete the file immediately
  • Rename the file authui_working.dll to authui.dll
  • Done!

To test copy an image larger than 256KB to C:\Windows\system32\oobe\info\backgrounds folder where custom logon screens are placed. You also need to have OEMBackground enabled in the registry, which you probably already have since otherwise you wouldn't be reading this post in the first place! Anyway, to enable OEMBackground navigate to this registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background

and set the value of OEMBackground to 1.

Finally press Win+L and be amazed!

P.S.: all credit goes to the author of this article from where I learned this procedure

P.P.S.: I keep uac off, so my instructions apply exactly only when uac is off.

7
  • Alternative method for replacing the file. Take ownership of the file authui.dll then move it out of System32 and move the patched file with same name to the folder. The file will continue to be used until you reboot so only after rebooting you will be able to delete the file and see the change (bigger login images being loaded).
    – 0rkan
    Commented Jun 22, 2016 at 3:42
  • 1
    Yes! It really helped me and was the only answer I found that did the job. Also you put it in a nice and concise way with an extra explanation on how to change the image. Keep learning and sharing the knowledge!
    – 0rkan
    Commented Jun 24, 2016 at 4:11
  • 1
    WARNING! Dont do this with UAC on since it breaks the ui. Had to connect my SSD to another computer and copy the file back to system32. Commented Mar 20, 2017 at 14:24
  • 1
    @PontusMagnusson Thanks for your addition. That's why every time I do a fresh install of Windows, one of the first few setting-ups I do is turn freaking UAC off! I don't need UAControl, when I am in control. ;-) Commented Mar 20, 2017 at 14:32
  • 1
    This is the answer! No 3rd party replacer tools nor even reboot are needed though, just take ownership and full control in permissions, kill explorer.exe to release authui.dll, and then overwrite or edit the dll right in place. Then revert permissions and ownership back to original values (NT SERVICE\TrustedInstaller) and start explorer.exe. If this doesn't work, check what other processes have the authui.dll in use by searching for handles/dlls in Process Hacker
    – sunny moon
    Commented Dec 26, 2018 at 10:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .