Windhawk aims to make it easier to customize Windows programs. It allows installing and configuring mods (customization modules) with just a couple of clicks. For developers, it provides a convenient platform for developing and sharing such mods.
You can find more details, browse for the available mods and download Windhawk on the official website.
Read on for the motivation behind creating Windhawk.
As a power user, I often find the need to customize the programs I use beyond the default settings. If I’m lucky, the relevant program provides options to customize it the way I need. If that’s not the case, I have several options:
- Accept the lack of customization and use the program as is.
- Find or create an alternative program.
- Find or create a helper program that fills the gap.
- Modify the relevant program.
Of course, some annoyances are less important than others. If that’s something I encounter rarely, e.g. if I can save a couple of clicks once a week, I’ll most probably choose the first option as it’s not worth the time. If that’s a very minor annoyance, I will probably live with it too. But if that’s something I encounter regularly and it’s annoying enough, I might start looking for a solution.
Finding an alternative program might be an option, but often there’s no good alternative. Perhaps the program I’m already using is the best of its kind, but it has this little annoyance which I’d like to fix. Of course, creating an alternative program myself is often too time consuming and not feasible.
Finding or creating a helper program that fills the gap is sometimes an option. For example, AutoHotkey can be used to overcome some annoyances (e.g. it can make the target program think as if you’re holding the Shift key). Another example is the X-Mouse Button Control tool which can help customizing mouse behavior for any program. I can also create a helper program from scratch, I’ve done this on several occasions. But there are many cases in which these approaches don’t work.
If none of the above works, what I’m left with is modifying the relevant program to fix an annoyance or add new functionality.
Modifying a program
So, I have a Windows program which I’d like to modify to better fit my needs. What are my options?
If the program is open-source, the best option is to implement the improvement and contribute it to the project. This way, all users can benefit from it, including myself, and that’s where my journey happily ends. But my contribution might be rejected, e.g. because it’s very specific for my needs or for any other reason. In this case, I can choose to fork the program, but if the program is updated regularly, maintaining a fork and keeping it updated can be a hassle.
If the program is not open-source, I can modify the compiled executable of the program, usually the .exe file (as long as it’s legal, of course). That’s a more challenging task and the details are out of scope for this post. I’ll just focus on two ways to apply such a modification:
- Modify the .exe file on disk (also known as binary patching).
- Modify a running instance of the target program in memory.
Both options are valid, but modifying the file on disk has several drawbacks:
- If the executable file is write protected, it can’t be modified.
- If the executable file is digitally signed, the signature becomes invalid.
- Every time the executable file is updated, it needs to be patched again.
- If something goes wrong with the patch, there’s no easy way to revert the changes – one must be careful to create a backup before patching. And if the target program is part of the system, a bad patch might be difficult to recover from, even in safe mode.
Given the above, modifying a running instance of the target program in memory is usually a better, safer and more robust solution.
Modifying a running instance of a program in memory
There are many possible use cases for modifying a running instance of a program in memory. It can be done for a minor customization or for adding a significant missing feature. It can be required because the target program is no longer developed, because the developer refuses to add a feature or fix a bug, or for other reasons. In fact, the most popular program on this website, 7+ Taskbar Tweaker, is a great example – it adds extra features and fixes bugs in the Windows taskbar, features and bugs which Microsoft is not willing to implement or fix, and which many users find useful.
One of the challenges in implementing such a customization is that apart from the customization itself, the developer has to take care of things such as process injection, function hooking, symbol loading, creating a user interface, and more. The extra effort required for even a simple customization means that sometimes it’s not worth the effort for a developer to invest the time and improve the experience for himself and other users. At other times, the developer can take a shortcut, such as patching the file, solving the problem for himself but not having an easy way to share his work with other users.
Windhawk was created to make it easier for developers to implement customizations for programs. It does this by taking care of the distractions mentioned above, such as process injection, allowing the developer to focus on the customization itself. This benefits both developers and users: Developers have a simple way to create customizations (good for developers) and share them with the world (good for users).
Another benefit for users is that every mod is just a single file of textual code. This makes it easier to review what the mod really does, unlike with an executable file which is very difficult to verify. And that doesn’t come at the expense of user experience – installing a mod takes a couple of clicks, unlike compiling an open source project which requires time, programming tools, and usually some programming skills. Also, it’s easy for a user without programming skills to make minor edits to existing mods, such as changing texts or tweaking simple calculations. A mod can even be shared via a service such as Pastebin.
Example use cases
Below are examples of projects or customizations which could use Windhawk.
Fixing a 3+ year old bug in NVIDIA GeForce Experience. A great research by Dmirty, in which he hunts for a bug in an NVIDIA software, and finally finds a solution. For other users to use his solution, he proposes the following:
Use a hex editor to patch NVIDIA’s binary file. Alternatively, use this PowerShell script. The PowerShell script is tailored for a specific version of the binary, and it links to another PowerShell script which attempts to patch any version using heuristic. The downsides: It might not be obvious to all users how to use a hex editor or how to run a PowerShell script, and this process has to be done after every update. The other downsides of patching a binary file apply here too. With Windhawk, Dmirty could create a mod with a similar amount of effort, making the solution easier to use and accessible to more users.
By the way, I like the top comment to the research in Hacker News:
“I changed this byte in the library to fix the problem” is the ultimate triumph of being in control of your device imo. If your CPU can do a thing, you can (in principle) always find out why it does that thing and make it do something else if you want. It’s just bytes all the way down.
This is exactly what Windhawk is about – making it more accessible to gain that control over your device.
How I cut GTA Online loading times by 70%. Another impressive research that is worth reading. The author implemented a solution, and here are his usage instructions:
git clone --recurse-submodules https://github.com/tostercx/GTAO_Booster_PoC
- build the project with MSVC
- inject the DLL with your favorite injector while the game is starting up
Not that the author did something wrong – he made a quick fix for something that should have been fixed by the company a long time ago, and shared it with the world. But wouldn’t it be better if with the same amount of effort he could share his solution to all users, even those unfamiliar with terms such as Git or MSVC? Wouldn’t it be nice if everyone could install the fix in a couple of clicks?
Windows Timer Resolution: Megawatts Wasted. This blog post by Bruce Dawson explains how some programs increase power consumption irresponsibly, but he doesn’t suggest a solution except for the vendors to stop increasing power consumption when not needed. But what if the vendor doesn’t fix the irresponsible power consumption usage? Possible solutions are discussed in the blog post comments, and eventually Bruce says the following:
I don’t think that a third-party solution would be practical, but I’m happy to be proven wrong. My main concern would be that any third-party modification or shimming of winmm.dll would be indistinguishable from malware.
I’m not sure what his definition of malware is here. Perhaps what he means is that if somebody develops an easy to use solution, it will be in the form of a binary file, and it’s difficult to verify that it’s not malware. On the other hand, if the solution comes in source code form, it’s difficult to use as we’ve just seen in the previous examples. Windhawk provides the best of both worlds – allowing to share a solution in source code form which is easy to verify, and which at the same time can be installed in a couple of clicks. In fact, I’ve implemented such a mod and it’s ready to install and use: Timer Resolution Control.
- Arranging Invisible Icons in Quadratic Time. Another fascinating blog post by Bruce Dawson about a performance bug in Windows. He reported this bug to Microsoft more than a year ago, and it still wasn’t fixed. This is yet another example in which Windhawk can be used to develop and share a solution. Maybe somebody will do that eventually.
Windhawk and 7+ Taskbar Tweaker
As mentioned earlier, 7+ Taskbar Tweaker, the taskbar customization tool for Windows, is the most popular tool among the tools you can find on this website. You might wonder what are the pros and cons of both tools, since customizations can be developed and shared in both, and how Windhawk affects the future of 7+ Taskbar Tweaker.
Regarding pros and cons, here’s a quick summary:
- Resource usage: Both have similar resource usage when running in the background, running as a lightweight native module which is injected into the relevant process. Windhawk might use more resources when managing mods, and it also takes more disk space, but I see it as less important since it doesn’t affect the daily computer usage.
- Stability: In both projects, stability is a very important metric for me. Both are constantly running in the background on my computer, and system stability is not affected in any way. I expect that Windhawk, being a newer project, has more bugs, but I take stability bugs very seriously and I assume most of them will be fixed as they are identified.
- Ease of use: Both are rather easy to use and require no technical knowledge. Of course, creating mods for Windhawk requires a different set of skills, but it’s not relevant to the comparison.
- Specialization: 7+ Taskbar Tweaker is specific to taskbar customization, while Windhawk can customize any aspect of any program.
As you can see, for a user, both solutions are quite similar as long as both provide the same customizations. Windhawk makes it easy for developers to create such customizations, and unlike with 7+ Taskbar Tweaker, anyone can contribute customizations, which means users will have more possibilities to customize their programs the way they want it.
Regarding the future of 7+ Taskbar Tweaker: It will keep existing as a separate program which supports Windows 7 to Windows 10. As mentioned in a recent blog post, most parts of the taskbar were reimplemented in Windows 11, and 7+ Taskbar Tweaker can’t be made to work with the new taskbar without a huge amount of work. My plan, at least in the short term, is to implement the most demanded customizations for Windows 11 as Windhawk mods. A couple of mods are already available, take a look. A more detailed blog post about Windows 11 taskbar customization and Windhawk will be published soon.
I hope that Windhawk will fulfill its vision in helping users gain control over their device. Go download Windhawk on the official website and share your experience. I’d love to hear your feedback about Windhawk, both from users and from developers.