Hak5
Save 10% at GoDaddy.com with coupon code HAK

Skinning the PortableAppsMenu

From Hak5

Jump to: navigation, search

PortableApps.com makes a suite of applications that can be easily installed to any removable media. This tutorial will show you how to skin the suite's menu.

Contents

What you'll need

You can use what ever tools you find comfortable, however using the following will allow you to stay with the tutorial.

Getting the Bitmaps

Before we unleash our inner Picasso, we must first extract the bitmaps from the executable.

UPX decompression

All of the Applications in the PortableApps Suite are compressed using the UPX Executable compression, available from http://upx.sourceforge.net/. So, we must first decompress the executable using the -d option. The executable that we need is PortableApps\PortableAppsMenu\PorableAppsMenu.exe.

C:\Documents and Settings\psycho>cd [Put the location of the UPX installation here]

C:\upx203w>upx -d "[Put the location of the ProtableApps Installation Here]\PortableApps\PortableAppsMenu\PortableAppsMenu.exe"
                       Ultimate Packer for eXecutables
    Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006
UPX 2.03w       Markus Oberhumer, Laszlo Molnar & John Reiser    Nov 7th 2006

        File size         Ratio      Format      Name
   --------------------   ------   -----------   -----------
   1276928 <-    287744   22.53%    win32/pe     PortableAppsMenu.exe

Unpacked 1 file.

Extracting the Hex Data

Now open the PortableAppsMenu.exe in ResHacker. Under RCData -> TRFMMenu -> 0 is the configuration file for the menu. Edit at will. There is also in the configuration file Hex data for the images, to extract it find the magic number (listed below) in the Hex data. Copy, including the magic number, from there to just before the closing '}', and paste it in to Hex Workshop, by going to Edit -> Paste Special... and choosing "CF_TEXT" and the "Interpret as a hexadecimal string" option is checked. Make note where you got each file from you will need later. Save it with the appropriate extension, and you can now edit the images you just created.

Image:PortableAppMenu-example.png

Tips

The very large piece of Hex Data (second "chunk") is the main red part of the skin

Magic Numbers

  • 424D
    is a Bitmap (.bmp)
  • 0000 0100
    is a Icon (.ico)

Finshing up

Repacking the Images

Reopen the image in Hex Workshop. Select all of the data and goto Edit -> Copy As -> Hex String. Go back to ResHacker in the place where you extracted the image, you made note of this earlier. Reselect the image and paste, this should replace the old image data with the data from Hex Workshop.


Click "Compile Script" and then save it. PortableAppsMenu.exe should now run with the new skin. You may want to re-compress it with UPX to keep the executable small.