Page 1 of 3

Guide: Changing Longhorn's major, minor and build number

Posted: Fri Jan 25, 2013 12:45 am
by Knabe91
Hello, I'd like to show how to modify Longhorn's major, minor and build numbers. As an example I will show how to modify Windows Longhorn 4074 to appear as Windows XP to any software used on it even drivers. This will solve many compatibility issues.

Step 1: This will require a hex editor since you will be editing the actual kernel, so pick your favorite editor.
Step 2: With your hex editor open the file "ntoskrnl.exe" or any of the kernel files that you will be using to boot Windows. (ex. ntkrnlpa.exe)
Step 3: With the file open in your hex editor, search for the string of the build number of the Windows that you will be modifying. (ex. 4074) You should find something like this in your hex editor
Image

Step 4: After locating the string look to the left of where the string is located and look for a hex value of 0600000000. Then modify the hex value to appear as 0500000001. This will modify the major and minor versions of windows.
Step 5: After making that modifcation it is now time to change the build number. In the hex editor search for the integer number of your build like 4074. In Longhorn 4074 the number should be located near a string that reads "\.S.y.s.t.e.m.R.o.o.t.\.S.y.s.t.e.m.3.2.\.s.m.s.s...e.x.e" The value you need to change is the build number in hex which is EA 0F, change this to 28 0A so that it now will use the XP build number 2600.
Image

Step 6: Save your changes and either reboot or copy over the modified file into the System32 folder. After reboot you should now have an XP major, minor and build number.
Image

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Sun Jan 27, 2013 7:43 am
by maxtorix
Can you upload 4074's ntoskrnl.exe modified files (both x86 and x64)?

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Sun Jan 27, 2013 8:34 am
by Knabe91
Here you go http://www.adrive.com/public/Df8jTR/Mod ... toskrnl.7z
I only modified ntoskrnl.exe like you asked. For multi processor or PAE installs you may have to edit the other ones like ntkrnlpa and such. Also, the 64 bit one I modified to XP 64's version number 5.2.3790. Just let me know if you would prefer 5.1.2600 instead.

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Mon Jan 28, 2013 12:30 am
by maxtorix
Great, thank you!

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Mon Jan 28, 2013 6:42 pm
by Dragondemonlord
Tried this on my friends copy of Longhorn and I must say I am impressed ^.^.
Does this only work on Longhorn?

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Mon Jan 28, 2013 7:19 pm
by Knabe91
I am glad you had success :D
From what I have tested, it works on all Longhorn builds x86 or x64, however post-reset builds it only works on x86. I have not figured out how to change the x64 builds of those. From what I can tell its seems Microsoft went a little too far in calling Longhorn NT 6 it's actually more like NT 5.2 or XP with sp2 or sp1 for the earlier builds before 4053.

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Mon Jan 28, 2013 7:26 pm
by Dragondemonlord
Ok. Also how long did it take you to figure this out? Or did you do some research?

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Mon Jan 28, 2013 7:27 pm
by Pwned
I'm almost sure imagecfg changes the build number the same way.

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Mon Jan 28, 2013 7:32 pm
by Knabe91
It didn't take long to find the build number but finding where the major and minor are stored took forever, however I had experience using imagecfg for Neptune and Windows 2000 so I knew it was somewhere in ntoskrnl. Imagecfg does not work on Longhorn I tried many many many times and it wouldn't do a thing.

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Tue Jan 29, 2013 6:04 pm
by mcmxcixmm
Knabe91 wrote:I am glad you had success :D
From what I have tested, it works on all Longhorn builds x86 or x64, however post-reset builds it only works on x86. I have not figured out how to change the x64 builds of those. From what I can tell its seems Microsoft went a little too far in calling Longhorn NT 6 it's actually more like NT 5.2 or XP with sp2 or sp1 for the earlier builds before 4053.
You do know that NT 5.2 already exists, right?

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Tue Jan 29, 2013 7:01 pm
by Knabe91
Yep I'm aware. I was simply just comparing Longhorns capabilities to it since its far from Vista NT6.

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Wed Jan 30, 2013 9:06 pm
by z180
We could rename our Longhorn installations to XP SP4.

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Wed Jan 30, 2013 10:59 pm
by Knabe91
Yes I guess you could, but I would recommend just calling it XP sp2 or sp1 by using this with the service pack registry trick.

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Thu Jan 31, 2013 4:42 am
by habeasporpoise
There are a few values available via the Export Address Table of the PE. If you look up the values with a PE editing tool via the export then you don't risk trashing your kernel.

NtBuildNumber
NtBuildGUID
NtBuildLab

Should be available Vista RTM to Win 8.

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Thu Jan 31, 2013 6:06 am
by Knabe91
Well I have tried the PE method before I resorted to hex editing and it never worked. These values only change the file version numbers, which you can find near the botton of the file in the hex editor. Atleast thats what I found.

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Fri Feb 08, 2013 9:56 pm
by maxtorix
I cannot success in this, I've put ntoskrnl (what I'd download from here) in system32 - and haven't success, after that I've follow the guide and patch the ntkrnlpa and put it in, but also without any success.

What I'm doing wrong?


p.s. I'm trying on 4074, on VMware 9.0 (Preset: XP Professional)

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Fri Feb 08, 2013 10:03 pm
by Knabe91
There are some other kernel files that you may have to edit with the similar name scheme like ntkrnpamp, ntkrnlmp or ntkrnlup. It really depends on if you are using a uniprocessor or multiprocessor system for each one. Example, ntrkrnpamp is for multiprocessor systems with physical address extension on and ntkrnlup is for uniprocessor systems with pae off. Let me know if you are still confused or need help.

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Fri Feb 08, 2013 10:28 pm
by WinPC
Is there also a way to modify WINVER.EXE and System Properties to report the correct build number without pulling it from NTOSKRNL.EXE? As in, simply removing the code to pull the version number from NTOSKRNL.EXE and just directly placing it in (as a normal string of text) instead?

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Fri Feb 08, 2013 10:43 pm
by Knabe91
Um well I don't believe so, but I could be wrong. The main reason I modified this is so that every program, driver or whatever you try to use on the OS will pull that version number and think its XP or whatever OS version you decide to use. I wish there was a cleaner way, maybe there is, but this is the only way I have found thus far. My main reasoning for this though was to get my Nvidia GeForce GTX 480 to install on Longhorn 4074 :cool: which ended up working very well after doing this.

EDIT: Winver.exe is a program that pulls the version number from the kernel so if you run it in say Windows 2000 compatibility mode it'll report as version 5.0.2195, so that is not where you would want to change this.

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Sat Feb 09, 2013 12:04 pm
by maxtorix
WOW... I've patched all kernel files and on the end process was successful.

Now I'm interested for:
1. What mean "EA 0F" and "28 0A" - because I've tried to convert this to decimal and I don't got some number like 4074 or 2600?
2. From which file watermark on desktop use string name, because after patching watermark is still the same?
3. Can be this made on Windows 7's or 8's beta builds? (Like RP build 8400 to be converted in 9200.16384 RTM)
---------------------
This guide/tutorial can be used for making Update packs for longhorn builds also.

Knabe thank you very much!

P.S. ADMINS/MODS make this thread/topic sticky - it is a very useful and big step forward in compatibility improvements in Longhorn era builds.

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Sat Feb 09, 2013 12:27 pm
by Pwned
maxtorix wrote:1. What mean "EA 0F" and "28 0A" - because I've tried to convert this to decimal and I don't got some number like 4074 or 2600?
It's reversed. There is a certain binary mode, called Intel Little-Endian or something. "13 37" becomes "37 13", now try to convert it.
maxtorix wrote:2. From which file watermark on desktop use string name, because after patching watermark is still the same?
Watermark is probably in win32k.sys.
maxtorix wrote:3. Can be this made on Windows 7's or 8's beta builds? (Like RP build 8400 to be converted in 9200.16384 RTM)
Maybe you can, if you patch all checksum, digital signature, and PatchGuard checks in bootmgr.

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Sat Feb 09, 2013 1:01 pm
by maxtorix
Pwned wrote:
maxtorix wrote:1. What mean "EA 0F" and "28 0A" - because I've tried to convert this to decimal and I don't got some number like 4074 or 2600?
It's reversed. There is a certain binary mode, called Intel Little-Endian or something. "13 37" becomes "37 13", now try to convert it.
Simplified:

Image

Image

Am I right ?

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Sat Feb 09, 2013 1:03 pm
by Pwned
If you are using a converter that supports Little-Endian, yes.

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Sat Feb 09, 2013 1:05 pm
by maxtorix
Pwned wrote:If you are using a converter that supports Little-Endian, yes.
I'm using this.

Re: Guide: Changing Longhorn's major, minor and build number

Posted: Sat Feb 09, 2013 1:09 pm
by Pwned
maxtorix wrote:
Pwned wrote:If you are using a converter that supports Little-Endian, yes.
I'm using this.
Ah I see. Yes, the directions on that picture are right.