How to "fix" Power Manager gadget after IE9 installation

In my previous post I wrote that after IE9 installation on my laptop, the transparency of Lenovo Thinkpad PowerManager gadget was broken down. Some time passed from that moment, meanwhile Lenovo released an PowerManager update, but the gadget still doesn't work properly. Because of that, I decided to fix the problem myself.

After some experimenting, I found the reason of broken transparency and figured out a way to bypass the problem. It turned out that the bug is not in the gadget, but in Internet Explorer. Installation of IE9 introduces the following bug. After every value assignment to, the PNG background transparency is toggled on/off. Knowing exactly where the bug is I prepared a small, step-by-step tutorial on how to fix the gadget on our own:

  1. Create some temporary working folder (in my case it was D:\Temp)
  2. Copy PWRMGR.JS file into the temp folder. The file can be found in the gadget folder (in my case it's C:\Program Files\Windows Sidebar\Gadgets\PowerManager.Gadget\EN-US)
  3. From download the scrdec18.exe tool and save it in the temp working folder
  4. Open Command Prompt in the temp folder. It can be done for example by holding Shift key, right clicking somewhere in the Windows Explorer window (but not on a file icon) and selecting the "Open command window here" option
  5. Decode the PWRMGR.JS, file by issuing the following command:
    scrdec18 pwrmgr.js pwrmgr_dec.js
  6. Open the decoded file - pwrmgr_dec.js - in some text editor (i.e. Notepad++)
  7. Find the resizeView() function
  8. Inside that function, replace every occurance of
    with =

    The replacing will be necessary in 3 places, totally. Then, we save the changes, of course.

  9. Delete file PWRMGR.JS from the temp directory. Next, rename pwrmgr_dec.js into PWRMGR.JS
  10. From our temp working directory, copy PWRMGR.JS file into the folder from whick we took its original version. (in my case it's C:\Program Files\Windows Sidebar\Gadgets\PowerManager.Gadget\EN-US). Allow overwriting the file.
  11. We're done! For the changes to be visible we now have to restart the sidebar.exe process. It can be done for example by logging out and logging in again. Instead of that I recomend to issue the following command in the Command Prompt:
    tskill sidebar && "%programfiles%\Windows Sidebar\sidebar.exe"

Of course, after performing all the above steps we are free to delete the temporary working directory.