[How To] Change launcher's icon

Share, discuss and debug ready-made JauntePE launchers for non-portable applications.
Post Reply
Message
Author
User avatar
joby_toss
Posts: 2902
Joined: Sat Feb 09, 2008 9:57 am
Location: Romania
Contact:

[How To] Change launcher's icon

#1 Post by joby_toss » Sat Jan 10, 2009 8:02 am

I know this is something that most of you guys know how to accomplish, but maybe there are persons that don't have the time to search for tutorials and utilities to do this.

I don't change the icons for the launchers I'm posting because I think the applications' icons are bound to the same licenses as the applications themselves, preventing redistribution for them too (in most cases).
I do change them for myself and I advice you to do it also; otherwise your launchpad would be full of executables with the same icons and this is at least annoying.

So here is the way I'm doing this; I use a freeware (and portable) utility called Resource Hacker:
- download "ResHack.zip" from the application's home page and extract it to a folder of your choice;
- launch "ResHack.exe";
- use "File/Open" command and browse for the JPE launcher's executable (with the usb stick icon), then open it;
- click "View/Expand Tree" to have a better view of the resources;
- select "Icon/1/1033" resource (in the right panel the usb stick icon should appear);
- now click "Action/Replace Icon" command;
- click "Open file with new icon" button;
- browse inside the "App" folder for the application's exe (the one that the JPE launcher was made for); click "Open";
- select the icon resource you like the launcher to have (preferably the same as the application's, usually the first one); click "Replace";
- select "File/Save" command from the Resource Hacker's menu; a backup of the original launcher will also be created in case something went wrong, so don't worry;
- that's it.

A more detailed tutorial for Resource Hacker's usage, with screenshots, could be found here.

Good luck!

What method are you guys using (if any)?
Last edited by joby_toss on Sat Jan 10, 2009 10:50 am, edited 1 time in total.

User avatar
m^(2)
Posts: 890
Joined: Sat Mar 31, 2007 2:38 am
Location: Kce,PL
Contact:

#2 Post by m^(2) » Sat Jan 10, 2009 8:26 am

Once I created a script that took 2 executables and put the main icon from one in the other. I used ResHacker for it.
Can't find it though...

User avatar
m^(2)
Posts: 890
Joined: Sat Mar 31, 2007 2:38 am
Location: Kce,PL
Contact:

#3 Post by m^(2) » Sat Jan 10, 2009 9:16 am

Got it!

Code: Select all

@echo off

if "%2" == "" goto usage

::let's ensure we can call ResHacker by name
set path=%path%;"%~dp0"

::pseudorandom temp dir
set tmpdir=%TMP%\MoveIcon.bat_jsabfajf

md "%tmpdir%"

::extract icons from the original exe
ResHacker.exe -extract %1, "%tmpdir%\Icons1.rc", ICONGROUP,,

::get the 1st icon file name
set /p first_icon=<"%tmpdir%\Icons1.rc"
echo %first_icon%>"%tmpdir%\Icons2.rc"
grep -P -o \S*$ "%tmpdir%\Icons2.rc">"%tmpdir%\tmp"
set /p icon_file=<"%tmpdir%\tmp"
call :DeQuote icon_file

ResHacker.exe -addoverwrite %2, %2, "%tmpdir%\%icon_file%", ICONGROUP,MAINICON,

rd /S /Q "%tmpdir%"

goto :eof

::::::::::::
:: USAGE
::::::::::::
:usage

echo Usage: MoveIcon src.exe tgt.exe
echo.
echo Requires grep and ResHacker
pause>nul
goto :eof

::------------------------------------------------------------------------------------------------------------
:: DeQuote
::------------------------------------------------------------------------------------------------------------
:: Removes the outer set of double quotes from a variable.
:: Written by Frank P. Westlake, 2001.09.22, 2001.09.24
:: Modified by Simon Sheppard 2002.06.09
::------------------------------------------------------------------------------------------------------------
:DeQuote
SET DeQuote.Variable=%1
CALL Set DeQuote.Contents=%%%DeQuote.Variable%%%
Echo.%DeQuote.Contents%|FindStr/brv ""^">NUL:&&Goto :EOF
Echo.%DeQuote.Contents%|FindStr/erv ""^">NUL:&&Goto :EOF
 
Set DeQuote.Contents=####%DeQuote.Contents%####
Set DeQuote.Contents=%DeQuote.Contents:####"=%
Set DeQuote.Contents=%DeQuote.Contents:"####=%
Set %DeQuote.Variable%=%DeQuote.Contents%
  
Set DeQuote.Variable=
Set DeQuote.Contents=
Goto :EOF
Requires ResHacker and grep.

User avatar
Midas
Posts: 4384
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: [How To] Change launcher's icon

#4 Post by Midas » Mon Jan 28, 2013 8:22 am

For an easier method, see QIcon Changer at http://www.portablefreeware.com/forums/ ... hp?t=16878

Post Reply