Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: How to change boot animation in Windows 7

16 Mar 2011   #691
joakim

ubuntu
 
 

I have done some tests and believe it is impossible to set screen resolution correctly to 800x600 and get animation at the same time. However I noticed it is possible to boot with 1024x768 and then force the kernel into believing the resolution is something different (must be smaller though, else it will crash) right before it will play the animation. With forced 800x600 it will look like flimmering stretched over the screen like this;


With 768x512 it looks like this;

To test this in windbg you can issue this command;
Code:
bp nt!BgpGetResolution "eb nt!BgInternal+0x8 00 03 00 00 00 02 00 00 00 03 00 00"
That is for 768x512 since 300h in decimal = 768 and 200h in decimal = 512.

So the animation is played, but with a very distorted look.

DO NOT TEST THIS HACK ON REAL HARDWARE!!


My System SpecsSystem Spec
.
16 Mar 2011   #692
joakim

ubuntu
 
 

Just tried implementing the stupid hack into a patch. Now the code looks ok in IDA, and should work according to that;
Code:
PAGEBGFX:00749623                 mov     ecx, 300h
PAGEBGFX:00749628                 mov     [eax], ecx
PAGEBGFX:0074962A                 mov     ecx, 200h
PAGEBGFX:0074962F                 mov     [eax+4], ecx
PAGEBGFX:00749632                 mov     ecx, 300h
PAGEBGFX:00749637                 mov     [eax+8], ecx
PAGEBGFX:0074963A                 nop
PAGEBGFX:0074963B                 nop
PAGEBGFX:0074963C                 nop
PAGEBGFX:0074963D                 retn
Machine code;
Code:
B9 00 03 00 00 89 08 B9  00 02 00 00 89 48 04 B9 00 03 00 00 89 48 08 90  90 90 C3
But while booting it seems that the code has modified itself slightly. Inside windbg I find this code at the same location;
Code:
nt!BgpGetResolution:
82f58623 b90003f080      mov     ecx,offset NETIO!NetioAllocateNetBufferMdlAndDataPool+0x34 (80f00300)
82f58628 0b08            or      ecx,dword ptr [eax]
82f5862a b9000200f0      mov     ecx,0F0000200h
82f5862f 09cb            or      ebx,ecx
82f58631 04b9            add     al,0B9h
82f58633 0003            add     byte ptr [ebx],al
82f58635 0000            add     byte ptr [eax],al
82f58637 79c9            jns     nt!GxpWriteFrameBufferPixels+0xa2 (82f58602)
nt!BgpGetResolution+0x14:
82f58639 8a909090c390    mov     dl,byte ptr [eax-6F3C6F70h]
Roughly 50% of the code has changed..

Kernel base = 0x82c0f000.

(82f58623-82c0f000)+400000=749623

Code on the next boot (with different kernel base);
Code:
nt!BgpGetResolution:
82f49623 b900030080      mov     ecx,80000300h
82f49628 0b08            or      ecx,dword ptr [eax]
82f4962a b900020000      mov     ecx,200h
82f4962f 09cb            or      ebx,ecx
82f49631 04b9            add     al,0B9h
82f49633 0003            add     byte ptr [ebx],al
82f49635 0000            add     byte ptr [eax],al
82f49637 89c8            mov     eax,ecx
82f49639 8a909090c390    mov     dl,byte ptr [eax-6F3C6F70h]
Any ideas? Tricks present to fool disassemblers?

Joakim
My System SpecsSystem Spec
16 Mar 2011   #693
thaimin

Windows 7 Pro 64 / 7 Pro 64 / 7 Home Prem 64
 
 

One thing that kept getting in my way is the relocations. Look at the relocations table (.reloc) and zero out any that are in the range you are editing. From my experience you can just put "00 00" for any relocation you want to skip, it doesn't matter that the "00 00" is in the middle of a list.

References:
http://msdn.microsoft.com/en-us/magazine/cc301808.aspx - "Base Relocations"
http://msdn.microsoft.com/en-us/library/ms809762.aspx - "PE File Base Relocations"
My System SpecsSystem Spec
.

16 Mar 2011   #694
thaimin

Windows 7 Pro 64 / 7 Pro 64 / 7 Home Prem 64
 
 
New Version Released

Alpha v11 has been released.

Notable new features:
  • Allows changing the background to an image
  • Can run in different languages and the language can be changed at run-time, includes translations for German, Russian, and Italian
  • Reverted it to use only .NET Framework 2.0 and not require MS Visual C 2010 library - no more errors about missing MCVS100.dll!
  • Much faster startup and checking of bootres.dll - marcisj0015, no more 2 minutes to start the program!
  • Can now create a standalone installer - no need to create RAR installers!
Minor new features:
  • Improved transparency support
  • Boot skin files are smaller
  • Improved update checking
  • Slightly improved backup system
  • Smarter default winload and winresume paths using BCD data
  • Numerous other minor changes and fixes
Download: http://www.coderforlife.com/projects/win7boot/
My System SpecsSystem Spec
17 Mar 2011   #695
GEORG

Windows 7 64 Bit
 
 

Danke (THANKS) for germany language !!!
My System SpecsSystem Spec
17 Mar 2011   #696
phucduongqb

Windows 7 Professional X86
 
 

How to translate win7bootupdater to vietnamese language?
My System SpecsSystem Spec
17 Mar 2011   #697
joakim

ubuntu
 
 

I got the code running by changing slightly on it. It had nothing to do with relocations as the code was still following the same order. Have no idea why it now works as it is essentially the same..
Code:
0073D61E  00030000                        dd 00000300h
0073D622  90                             nop 90h
0073D623  8B0D1ED67300                    mov ecx,[L0073D61E]
0073D629  8908                            mov [eax],ecx
0073D62B  8B0D3ED67300                    mov ecx,[L0073D63E]
0073D631  894804                          mov [eax+04h],ecx
0073D634  8B0D1ED67300                    mov ecx,[L0073D61E]
0073D63A  894808                          mov [eax+08h],ecx
0073D63D  C3                              retn
0073D63E  00020000                        dd 00000200h
Code for ntoskrnl.exe 32-bit version 6.1.7600.16385.
It may only work as a test on a WinPE based system. I tried on a normal system and got stop 0x7b (as expected). So only for the fun of testing it.

@thaimin
Just downloaded and tried alpha 11. Good work! A few things;
I noticed a misleading error message. Since I'm using a custom made bootmgr your program will not detect it, and that is ok. But first there comes 2 similar boxes saying;
Code:
Error While Getting bootmgr Path
The bootmgr path in the BCD is invalid
and then a third one with "Unknown error (162)". Even when I revert to original bootmgr the same 3 error messages come. In my testsetup bootmgr is chainloaded by grub4dos. Could it be the device=boot configuration in BCD that messes up? I need to copy a fresh bootmgr to c:\ to get the program to add a static background to winload. Maybe we can have separated functions like;
- disable checks in bootmgr
- disable checks in winload.exe
- only modify background or animation or text or copyright
- allow files to be modified even if bootmgr/winload are already patched for security (ie search for the signature inside the file)
- give the user a listing of all modified files in the last message.

It also does not draw the background image correctly. I see that the bitmap is added to both winload.exe and winload.exe.mui. Necessary to add to the mui file? If I delete the mui, then the background image is drawn though.

Btw, cool with the frame counter following the mouse as you play an animation. And very nice have dotnet 2 back. Overall I'm very impressed by the massive amount of functionality, nice GUI and supported Windows versions.

Joakim
My System SpecsSystem Spec
17 Mar 2011   #698
thaimin

Windows 7 Pro 64 / 7 Pro 64 / 7 Home Prem 64
 
 

@GEORG
And thanks to moinmoin and Tendririan at deskmodder.de who did the translations!
By the way, I just (like 5 minutes ago) updated the program again to include a more complete/correct German translation.

@phucduongqb
See the following page. It has all the instructions (although only in English) and includes a download for the text file to edit.
http://www.coderforlife.com/projects...oot/translate/
My System SpecsSystem Spec
17 Mar 2011   #699
thaimin

Windows 7 Pro 64 / 7 Pro 64 / 7 Home Prem 64
 
 

@joakim 1
Yeah, it didn't exactly look like it was due to relocations, since the values added weren't equal to the base change, but its the only time I have seen the code change from what IDA shows and what windbg shows.

@joakim 2
It definitely is the device=boot in the BCD. I had no idea what this means, so I didn't implement it properly. So, what does it mean? How can I find out what is the path to the "boot device"?

The only device type my program knows how to handle properly at the moment is "partition". I would like to get the following to work as well: boot, file, ramdisk, qualified partition, and locate ex. Some I don't know how to get a path to (boot and qualified partition) others aren't things I can have normal paths to (file and ramdisk) and locate ex is just confusing.

You could have selected the bootmgr in \Windows\Boot\PCAT\bootmgr... but yes something needs to be done. Many people get confused when the second time they run the program it doesn't work (since I can't modify modified files).

I was trying to make it as simple as possible, but then you get problems like this.

I have been considering these changes though, but haven't thought too much about them until now:
  • Mark files in way so that I know it was modified by my program (maybe add something to the version information)
  • If the bootmgr file is marked, don't do anything to it
  • If the winload.exe file is marked, don't apply security modifications and use special versions of the patches to work with already-modified winload.exe
    • Some cases this won't work, I can't always modify a file that has been previously modified (e.g. the copyright string was long last time so I moved it to the end of rdata, and it has some random text now, I won't be able to find it)
    • In those cases I can automatically restore the backup and try again
      • This has issues if someone updated their boot animation, then applied SP1 (or any other update that changed winload.exe) and tried again. It gets confusing real fast.
Anyways, confusing. For the mean time I would like to make my program smarter about the BCD data (handle more of the device type) and handle the first 3 cases above, but none of the nested bullet points.

@joakim 3
It also does not draw the background image correctly".
In what way? Can you send / attach a picture of how it is and how it should be?

I see that the bitmap is added to both winload.exe and winload.exe.mui. Necessary to add to the mui file?
I use the same exact function to update the resources in winload.exe and in winload.exe.mui. Necessary for one of the texts and background color, and instead of making a separate function, I just decided it didn't hurt to add it to both.

Btw, cool with the frame counter following the mouse as you play an animation.
Thanks!

And very nice have dotnet 2 back.
The only drawback is that I can't it to compile correctly for .NET 2 and 64-bit (the EXE always comes out corrupted). However the 32-bit EXE works for both 32 and 64 bit Windows, with one minor problem. Open and Save Dialogs cannot select files in System32 on 64-bit Windows. However internally file paths work just fine wherever they are.

Overall I'm very impressed by the massive amount of functionality, nice GUI and supported Windows versions.
Thanks! I know that it isn't perfect, but I'm working on it. And it is the only tool of its kind in the world.

Thanks for all your feedback!
My System SpecsSystem Spec
17 Mar 2011   #700
joakim

ubuntu
 
 

Strange as it is, the crazy hack I posted does in fact work for a regular Windows 7 install. As often happens with this sort of stuff, I was using the wrong file (kernel in this case) that produced crashes on non-WinPE. I verified on a SP1 build and it did not complain (but I would still not recommend it though). But still funny to see 5 animations (a little bit distorted) in stead of 1. The point is that the patched function is only read once prior to playing the animation, so it will not affect other things (I think).

I'm just throwing in some research notes here for future reference, and updated in first post whenever something interesting comes along.

Joakim
My System SpecsSystem Spec
Reply

 How to change boot animation in Windows 7




Thread Tools




Similar help and support threads
Thread Forum
How di I change boot animation and text?
Hey! So I have been wanting to change my boot/startup logo from the default windows logo with "starting windows" and Microsoft text. So after many google attempts i have stumbled upon an application, BootUpdater. This program supposedly can easily change the windows animations and is exactly...
Customization
How do I change windows7 boot animation when resolution 800X600
Hello , I already know change windows7 boot animation need access bootres.dll and winload.exe.mui. But if resolution below 1024X768 it seem different. Can anybody teach me which file need be change, Thank you a lot! Ps. I know my English is terrible , I hope it can be understood.
Customization
Boot screen Animation Change?
I don't know if this one can be done. I know how to turn off the ding sound it makes when my computer boots up but does anyone know how to change the boot screen animation? I would like to put one of my own animations on there instead of the windows logo popping up from 4 little lights.
Customization
Windows 7 Home premium 64bit won't boot, just plays boot animation
My Windows 7 has stopped booting after a restart, the system would just endlessly play the boot animation and not boot properly... system restore won't work, startup repair won't work, chdsk and sfc won't work. I have yet to try and see whether a Registry fix works. Windows loads the WRE VERY...
BSOD Help and Support
How to change the boot screen animation?
Has anyone figured out how to change the boot animation? John
Customization


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 18:19.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App