In this article I'll show how I made VMWare Workstation 15 awesome again using a little-known Resource Hacker feature called "scripting".
But first, a bit of background..
Upgrade of VMWare
People who know me know that I prefer stable, tried-and-true solutions. Be it my primary operating system, the tools I'm using or things I eat for breakfast. Once I know that something is good, I don't want to change it.
So, for a long time I was using VMWare Workstation 10. It just worked. But as the new versions of Windows came out, they started requiring hypervisor to support some specific features. Otherwise it just won't work. For example, to be able to install Windows 10 1803, you will need VMWare 14.x. To install Windows 10 1903, you will need VMWare 15.x.
Can you tell me whether the network card is enabled? Printer? Sound card?
Who the hell designed these new icons? They are all gray-fucking-teal. Where are the colors? Colors are important part of user experience, we use colors every day to quickly judge situations and make decisions!
Also, in my opinion, these icons look like they have been beaten by the ugly stick. confused
Just for comparison, here's how it looked like in VMWare 10:
Everything is crystal clear here - colourless icon means "disabled", coloured icon with a green dot means "enabled". Activity is indicated by green dot turning light-green.
No, this is not going to work. I need my pretty VMWare 10 icons back!
Scripting Resource Hacker
Quick look around tells us that all icons are located in the vmapputil.dll. My first idea was to take Resource Hacker and replace few icons manually. But as it turns out, there are ~700 icons in the DLL. smile Of course, I could manually go through all of them, choose the most important ones and replace them.
Well, no. That will take too much time and I'm not a trained monkey. Let's automate that thing!
First, we need to extract all pretty icons from the old VMWare DLL. You can do it using Resource Hacker by right-clicking the "Icon" and choosing "Save [Icon] resources...". You'll get an .RC file and lots of ICO files in a folder.
Next, we need to replace corresponding icons in the new VMWare DLL. Using GUI, you can only replace one icon at a time. But Resource Hacker also supports command-line and scripts. Time to read the fabulous manual! smile
syntax: ResHacker.exe -script ScriptFile
ScriptFile is a text file with the following layout:
//comments are preceded by double slashes
-addoverwrite ResourceSrc, ResourceMask
-addoverwrite MainIcon.ico, ICONGROUP,MAINICON,0
OK, that looks reasonable.
To make a huge script replacing all the icons, I'll use the .RC file we got earlier and some magic of search and replace. This is what we have now:
11500 ICON "Icon_1.ico"
11510 ICON "Icon_2.ico"
and this is what we want to get:
-addoverwrite "Icon_1.ico", ICONGROUP,11500,0
-addoverwrite "Icon_2.ico", ICONGROUP,11510,0
Sometimes reversing is not about breaking some copy-protection or figuring out what some malware does. Sometimes it's just for a little bit of fun and entertainment.
Keep reversing fun!