I'm working with a customer on their migration from Windows 2000 to Windows Vista. And, as you might expect, they have built up quite a collection of software that explicitly checks to see if it is running on Windows 2000. Not Windows 2000 or higher, but Windows 2000.

So, we're using a lot of Win2000SP3VersionLie.

Along the way, we ran into a bit of a snag. We had an application that was failing when we reported the version number as Windows Vista, but when we applied the version lie, the application was crashing. Specifically, it was happening when we clicked File -> New.

Since it was crashing, I pulled out the debugger to see what was going on. I suspected that we had just gotten past the version check and hit another compatibility issue, but as it turned out, the version lie was the problem. The stack trace?

0:000> k
ChildEBP RetAddr 
WARNING: Stack unwind information not available. Following frames may be wrong.
0012b9c8 68f08728 GrooveUtil!_GrooveTraceKeyDefined+0x8ea
0012ba00 68f082b8 GrooveUtil!_GrooveTraceKeyDefined+0x7db
0012ba34 68f09cac GrooveUtil!_GrooveTraceKeyDefined+0x36b
0012bacc 68f0908c GrooveUtil!GCError::TerminateGrooveProcess+0x296
0012bae8 68f09fe8 GrooveUtil!GCError::GCError+0x1f
0012bb20 68ef104d GrooveUtil!GCError::int_RawError+0x26
0012bb60 68ef3eef GrooveUtil+0x104d
0012bb74 68f1bf38 GrooveUtil!GCChar::IsSpaceChar+0x7c7
0012bb90 68ef1c9e GrooveUtil!GCOSVersionInformation::IsWindowsVistaOrLater+0x6c
0012bb98 68ef1f21 GrooveUtil!DllUnregisterServer+0x68
0012bba8 68ef1d95 GrooveUtil!GCUtilDLL::GetSystemInfo+0x272
0012bbd4 68f6546e GrooveUtil!GCUtilDLL::GetSystemInfo+0xe6
0012bbf8 757a1742 GrooveUtil!GCoUnknownEnum2::CreateInstance+0x131c1
0012bc00 68f5433c MSVCR80!_initterm+0xf
00000000 00000000 GrooveUtil!GCoUnknownEnum2::CreateInstance+0x208f

...wait a minute - what is Groove doing here?

Groove has a shell extension that pops up whenever you use Windows Explorer. (You never know when you want to right click and select Groove Folder Synchronization - even when you're just using a common dialog to pick a new file for a completely unrelated application.)

And it turns out that Groove doesn't like to be lied to, and that lying about being Windows 2000 makes it AV.

What is the solution? Simply exclude GrooveUtil.DLL from the version lie shim. In Compatibility administrator, with the Windows 2000 version lie selected, press the Parameters button. In Module Name, enter GrooveUtil.DLL, press the Exclude radio button, and then click add. Save it, and then install the new custom shim database.

No more crash.

So, keep in mind - when you version lie to an app, you version lie to all of the DLLs in the app - even ones that it may not have direct control over. Like Groove.

(For what it's worth, the XP SP2 version lie doesn't cause a Groove crash.)

Oh, and for those developers contemplating writing code to check and see if the version number we report really is the version number, and looking for alternate ways to verify the return value, please don't. Some day, you may need a version lie, and you'll just make it harder for us to get it to you. If you can avoid an AV, great, but there's no reason to go nuts with those test matrices. We'll just exclude you...