Jump to content

Giving a program it's own icon - Help!


Guest aj76

Recommended Posts

I have put a cab file together to add a program to my device and add it to the start menu but I can't figure out how to give it it's own icon instead of the blue and white window. I have searched and found information on changing the icon but I want to get the cab to do it as part of the install so I can distribute to colleagues. Any help much appreciated.

Regards

AJ

Link to comment
Share on other sites

Guest gpcarreon (MVP)

I don't know if my suggestions would help:

1. If you are referring to changing an EXE's icon, you can do so by editing the file using a resource editor. Recompile the file then make a CAB.

2. If you want to leave the EXE intact, you may trick the phone to use your desired icon. This will work with LNKs (Start Menu shortcuts). You can use your own icon resource file or point your LNK to use an existing EXE (or DLL) file. Check explanations below.

Citing an example...

You have a file (main.html) located at \Storage Card\Program Files\Seven\ and you want to have a LNK of the htm file on your Start Menu. Instead of using the default Internet Explorer's icon, you preferred to have the icon on the Start Menu use your defined icon. What you can do then is to:

1. Compose the LNK codes

00#"\Storage Card\Program Files\Seven\main.htm"?\Storage\Seven.exe,-0

- The sample code means 'main.htm' will use icon 0 of 'Seven.exe'.

- 'Seven.exe' is your icon resource file located at \Storage. If you have several icons on the resource file, you can toggle which one to use by indicating the ID.

2. Copy-paste code in Notepad then save code as 'Any Name.txt' then change txt extension to lnk

3. Compose your INF. Include the lnk from instruction 2 as a regular file. Compile the CAB. Once CAB is installed on device, it would place the LNK on Start Menu, it's icon is ID 0 (zero) of your icon resource file.

Link to comment
Share on other sites

  • 2 months later...
Guest Barabbas
- 'Seven.exe' is your icon resource file located at \Storage. If you have several icons on the resource file, you can toggle which one to use by indicating the ID.

Anyone who can post an image of these icons with their command ID or tell me which icons have what ID? Would be much appreciated ;)

Link to comment
Share on other sites

Guest gpcarreon (MVP)
Anyone who can post an image of these icons with their command ID or tell me which icons have what ID? Would be much appreciated ;)

Shown below is a sample icon resource file named 'Seven.exe' with its 16 icons. The highlighted icon uses 0 as its icon ID.

snap669aq9.jpg

So when used in this sample code...

00#"\Storage Card\Program Files\Seven\main.htm"?\Storage\Seven.exe,-0

... the Start Menu shortcut would look like

post-12251-1192788953_thumb.jpg

Note link 2 (the tweaked one) is using icon 0 as opposed to link 1 (the default shortcut). I hope that helps. :(

Link to comment
Share on other sites

  • 2 months later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.