Thursday, July 20, 2006

Customising Icons on your PPC, Shortcut Icons & File Extension Icons

Big Thank You to Vicott Wong for this guide.

This guide will be separated into several parts:
1) How to view icons in Resource Files
2) How to customise File Extension Icons
3) How to customise Shortcut Icons

Part 1: How to view icons in Resource Files (EXE/DLL/CPL)

Firstly, you need a resource viewer so that you know what icons are found in resource files. You also need to take note of the index (think of it as address) for the icon you like in the resource file.

Sample Resource File: Download Here

You can try using my new freeware, RViewer, to view the icons in resource files. First of all, you just need to browse to the resource file you wish to view.
Then find the icon you like using Next/Previous or type in a number and tap on "Check".


Part 2: How to customise File Extension Icons

Take note of the index of an icon you wish to use. Also take note of the file path of the resource file.

In the above example, the path of the resource file is \iPAQ Filestore\My Documents\IconsLib.dll" and the index is "102". Next, you will need PocketTweak to customise the icon for file extensions. Let's customise the icon for DLL files in this example.

Launch PocketTweak and go to the "File Types" tab.
as shown below. Click on the "Edit" button to go into the 2nd screen and click on the "Edit" button to go to the 3rd screen.
Image Hosted by ImageShack.usImage Hosted by ImageShack.usImage Hosted by ImageShack.us
In the 3rd screen, use the "..." button to locate your resource file. Finally, add ",-102" ("102" is the index we had to take note of in the step earlier) at the end of the text box for "Icon:", as shown below.
Image Hosted by ImageShack.us
Done!

Part 3: How to customise Shortcut Icons

Firstly, you need to take note of the resource file and the icon index of the icon you wish to use just like Part 2.

In this example, we are going to link to this EXE file:
\Storage Card\Logical Sky CEdit\cedit.exe

The "normal" shortcut file (cedit.lnk) to this program looks like this:
44#"\Storage Card\Logical Sky CEdit\cedit.exe"

You can open the LNK file using Pocket Word in order to see something like what's above. What's the number 44 in front suppose to mean? It's actually the character count for the file, including the "44". You can use the Word Count function in Pocket Word to do a quick check.

Now, let's say we are going to use the same EXE file as the resource file and the icon index we wish to use is 101. So, the icon path is \Storage Card\Logical Sky CEdit\cedit.exe,-101

In order to use this icon for the shortcut file, this is the preliminary code for the modified shortcut file (cedit.lnk). Note that the "?" sign is used and the icon path is pasted behing the "?" sign.
44#"\Storage Card\Logical Sky CEdit\cedit.exe"?\Storage Card\Logical Sky CEdit\cedit.exe,-101

However, the character count is no longer 44 now. Let's change it.
87#"\Storage Card\Logical Sky CEdit\cedit.exe"?\Storage Card\Logical Sky CEdit\cedit.exe,-101

But... the last number after the comma sign should be ignored in the character count. So, here's the final code for the LNK file.
84#"\Storage Card\Logical Sky CEdit\cedit.exe"?\Storage Card\Logical Sky CEdit\cedit.exe,-101

Now you can save your changes with ease. The shortcut now has a new icon and still works (able to link to program).

3 comments:

vicott said...

I've made some corrections to the shortcut syntax. I was mistaken about the number in front. It should be the character count after the # sign and up till the last comma sign. It should also include whitespaces in the character count. I've made the admentments in my blog article and also PPCSG forum thread.

nik said...

is there a way to customise a single shortcut file to a specific file with an distinct icon?!

karina said...

What an exciting experience!/Hilarious! Delightful! True!/wonderful stuff! thank you!

Pay Per Click Company