I will explain why in a seperate post, but on my MacBook Pro I wanted to use the Intel Thunderbolt driver under BootCamp instead of the ones supplied by Apple.

The Thunderbolt control program however refused with the following error message:

This application is not supported on Boot Camp. (Thunderbolt devices and networking will work correctly.)

It’s really beyond me why Intel would deliberately block their Thunderbolt software on Apple hardware (under Windows). Believing this was just a simple hardcoded hardware check rather than any hardware issue that would prevent the drivers to work I proceeded into finding where the check takes place.

 

Total Commander is a nice tool for this as it allows you to search for text in folders (recursively) in different encodings (ASCII, Unicode etc).

I searched for the text “Boot Camp” in the folder C:\Program Files (x86)\Intel\Thunderbolt Software and found the exact text from the error message:

Total Commander | Find Files | ASCII | Unicode

Ignoring the resources dll’s as I figured these would only contain translations in different languages I had a look at Thunderbolt.exe.

Since managed and non managed binaries require different tools for analysis and patching my first step was to determine if the binary was managed or non managed.

Presence of the file Thunderbolt.exe.config already hinted at managed and the contents of the file confirmed it:

 

I already wrote a blog post on how to modify a managed binary with Reflector and Reflexil in 2013 but today other and easier ways to do this exist.

For this blog post I am using Telerik JustDecompile which has a great feature: you can replace code in the binary with code rather than .NET IL (Intermediate Language). That makes it a lot easier!

Open the Thunderbolt.exefile in JustDecompile and press the Search button. I first searched for Boot Camp and BootCamp which both yielded no result. Next search was Applewhich was a hit:

Telerik JustDecompile | Search | Apple

The Method IsAppleSystemsounds like exactly where we need to be so let’s click that one:

Here is the code:

 

It uses WMI (which is evil but that’s a seperate discussion) and checks the manufacturer string. Let’s change this function to always return false!

Choose Reflexil from the Plugins menu:

image

This brings up the Reflexil window with the IL code. Simple Right Click and select Replace all with code.:

image

This will show the Compilescreen:

image

Simple replace return default(bool); with return false;and press Compilefollowed by Ok.

image

Finally save the modified binary:

image

And voila that did it!

image

image

No security doesn’t look the most secure level (so much for security eh Apple?):

image