Jump to content
MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. ×

PE Tool for creating patches


WildBill
 Share

Recommended Posts

Thanks for catching that. I updated the link so it points to the right version. I'll take a look at user32 when I get a chance (at present I need to add some things to kernel32.dll)

I also posted KB2393802 v18, which adds some new API calls:

halacpi.dll
halmacpi.dll

KeAcquireInStackQueuedSpinLock
KeReleaseInStackQueuedSpinLock

ntoskrnl.exe
ntkrmlpa.exe
ntkrnlmp.exe
ktkrpamp.exe

IoCsqInitialize
IoCsqInsertIrp
IoCsqRemoveIrp
IoCsqRemoveNextIrp

Since this is the first time I made any changes to hal.dll I held onto this one for quite a while to make sure it's okay. All seems good here, so I've decided to release it into the wild.

Edited by WildBill
Link to comment
Share on other sites


I've got couple of updates posted:

KB2393802 v19

kernel32.dll

WTSGetActiveConsoleSessionId

KB2508429 v11

advapi32.dll

StopTraceA
StopTraceW
UpdateTraceA
UpdateTraceW
GetInheritanceSourceA
GetLocalManagedApplicationData
QueryTraceA
QueryTraceW
RegDisablePredefinedCacheEx

RegDisablePredefinedCache upgraded to XP specs

Link to comment
Share on other sites

  • 1 month later...

Tomasz, you say that UURollup and Update Rollup 2 are "complementary". Does that mean that -- after installing the official MS Update Rollup 1 I should install BOTH of these? Or is it better to choose just one?

As an experiment (which I could reverse using a disk image!) I installed UURollup (Windows2000-UURollup-v10d-x86-ENU.exe) but was unable to install Firefox 26 (wanted XP SP2) using the Application Compatibility Launcher. CDRWin 10 installed but wouldn't work.

It'd be nice to have an easy way to prolong the life of W2K.

Link to comment
Share on other sites

I hope to finally do something in the near future to simplify the whole process but at the moment updating Windows 2000 is unfortunately rather complicated :(

The simplest method that I'd recommend would be either to slipstream the OnePiece update pack and then install the unofficial updates, or use Windows Update and let it install everything what's available there, and then apply the unofficial patches.

As for UURollup-v11 (I really wouldn't recommend using v10 at this point), it does officially require UR2. Still, UR2 is just a compilation of the official updates and hotfixes so it's not absolutely necessary as long as you've installed all official updates already.

Together with UR2 and UURollup I'd also highly recommend installing the latest IE cumulative update (that is the one released post-EOL).

I've heard the installer in the new versions of Firefox isn't compatible with the Application Compatibility Launcher. How about checking Firefox Portable? It should work out of the box.

Link to comment
Share on other sites

  • 3 weeks later...

Hey everyone, I have three new updates available. They add a bunch of new API calls:

Windows2000-KB2479628-v9-x86-ENU.exe

shell32.dll

ShGetFolderPathAndSubDirA
ShGetFolderPathAndSubDirW



Windows2000-KB2393802-v20-x86-ENU.exe

ntoskrnl/ntkrnlpa/ntkrnlmp/ntkrpamp.exe

PsGetCurrentProcess
PsGetCurrentThread
PsGetCurrentProcessSessionId
NtQueryInformationProcess: added support for PROCESSINFOCLASS.ProcessImageFileName (0x1B), required by psapi additions below

psapi.dll

GetProcessImageFileNameA
GetProcessImageFileNameW
GetPerformanceInfo

kernel32.dll

GetUserGeoID
GetGeoInfoA
GetGeoInfoW


Windows2000-KB2508429-v12-x86-ENU.exe

dbghelp.dll

SymFromAddr
SymFromName

In kernel32, I implemented the GetGeoInfo functionality by adding GEOINFO resources to the file with Resource Hacker. They're a set of $-delimited Unicode strings that contain the returned values for Geo info types 1 through 11 (everything that I could dump from a Win7 box). If you need to make a localized version, I strongly recommend adding new localized entries and leaving the existing 1033 (en-US) strings in place: this is because the code that I added will substitute locale 1033 (0x409: en-US) if a program asks for the invariant locale 0x7F (which Win2k doesn't have).

At some point I want to add a way to override the OS version information that applications receive: I wanted to try out the Neverwinter MMO, and I was only able to get it to install by trapping a call to GetVersionEx in a debugger and changing the returned values to tell it the build was 5.1.2600 (XP). I hate it when apps try to protect you from yourself! Anyway, once you get past the installation process, it runs just fine with these patches installed.

I was also able to play The Witcher, but you have to grab dbghelp.dll from XP SP3 and put it in the game's folder. I've started looking at trying to upgrade 2k's dbghelp.dll to support the API calls it needs, but it's not a trivial process.

Link to comment
Share on other sites

Just a little addendum: I'm working on KB2479628 v10 that integrates all of blackwingcat's additions to shell32.dll (I've done them all except the SHRestricted upgrade). I might try to add a few more API's if I can as well. I already have Firefox 26 running in my VM :D

Link to comment
Share on other sites

This is very interesting :) I've always wished the compatibility between yours and BWC versions of the same files was better. There are still many cases where the APIs offered by your version of a file and by a BWC version of the same file are completely different :(

Link to comment
Share on other sites

This is very interesting :) I've always wished the compatibility between yours and BWC versions of the same files was better. There are still many cases where the APIs offered by your version of a file and by a BWC version of the same file are completely different :(

Yeah, I generally work on mine independently. If I had a list of the API differences handy I'd probably be able to add whatever is missing.

Anyway, Windows2000-KB2479628-v10-x86-ENU.exe is now available. I've integrated blackwingcat's additions, and I'm posting this from Firefox 26!

I did make a couple of changes to blackwingcat's code, however. There was one case where he loads a DLL and then unloads it, but leaves the handle to it unchanged. This could cause other API calls to fail because they would think the DLL was loaded when it wasn't. I bypassed the call to UnloadLibrary() for safety's sake.

The other change was in how I handle the call to CoCreateInstance(). I call the full routine, which checks to see if it's loaded or not. blackwingcat calls to the middle of it, which seems unsafe to me.

Other than that, the functionality is identical.

Enjoy!

Edited by WildBill
Link to comment
Share on other sites

Ugh.

The good, the bad, and the ugly.

The good:

I finally figured out why backup/restore functionality wasn't working in my kernel32 rewrite and fixed it.

The bad:

It was due to a bug I introduced right when I first started patching kernel32.dll.

The ugly:

I just posted KB2393802 v21, which is an emergency release that fixes the bug.

Any backups you made using KB2393802 prior to v21 will not restore properly.

Link to comment
Share on other sites

I won't declare it completed, but it's ready for another posting and round of testing ;)

http://www.mediafire.com/download/2ikz2xg2rw0eqbk/Windows2000-kernel32-rewrite-v4.zip

I still have a lot of API's to add to it that were added since KB2393802 v14, for instance.

Edited by WildBill
Link to comment
Share on other sites

It seems the latest Kernel32 rewrite has a little problem:

I installed it in a Windows 2000 VMware VM and every time I try to log in, it gives me the following BSOD:

STOP: c000021a {Fatal System Error}The Windows Logon Process system process terminated unexpectedlywith a status of 0xc0000005 (0x00000000 0x00000000)The system has been shut down

The updates installed on the system are:
Service Pack 4 & Update Rollup 1

Update Rollup 2

Internet Explorer 6 with the April 2013 Cumulative Update (KB2817183) (Custom Support Update)

Windows Script 5.7

KB2360937-v2 (The MS10-084 update)

KB2393802-v21 (MS11-011)

KB2479628-v10 (MS11-012)

KB2508429-v12 (MS11-020)

kernel32-rewrite-v4

EDIT: I was able to start up in Safe Mode with Command Prompt to restore the MS11-011 v21 kernel32 however.

EDIT2: Forgot to mention IE6

Edited by MacLover
Link to comment
Share on other sites

I worry that the critical problem on srv.sys (WildBill version) bugs is fixed or not, too.

http://www.msfn.org/board/topic/170360-stop-0x1e-in-srvsys-part-2/

It seems the latest Kernel32 rewrite has a little problem:

I installed it in a Windows 2000 VMware VM and every time I try to log in, it gives me the following BSOD:

STOP: c000021a {Fatal System Error}The Windows Logon Process system process terminated unexpectedlywith a status of 0xc0000005 (0x00000000 0x00000000)The system has been shut down

The updates installed on the system are:
Service Pack 4 & Update Rollup 1

Update Rollup 2

KB2360937-v2 (The MS10-084 update)

KB2393802-v21 (MS11-011)

KB2479628-v10 (MS11-012)

KB2508429-v12 (MS11-020)

kernel32-rewrite-v4

EDIT: I was able to start up in Safe Mode with Command Prompt to restore the MS11-011 v21 kernel32 however.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    No registered users viewing this page.


×
×
  • Create New...