[App][2010.11.10] Png2Exe - Creates an exe file with an embedded image as icon.

Search This thread

dubidu

Senior Member
Apr 19, 2006
210
168
UK
Let's say you have a nice exe file, but the icon included in the file is rubbish (which is quite common because developers sucks at graphic work :))

This app can be used to create a launcher exe for that application with a image as the icon. It converts the image file (png,jpg,gif or bmp) into an ICON and inserts it into the EXE, so it can be used to set different icons as the ones provided in the original exe.

Really simple to use, takes 4 input values:

. Path of the original exe.
. Arguments to pass to the program.
. Path where the launcher will be created.
. Path for the image file used for the icon.

It allows to specify the arguments for the process, so it can be used to executing individual items on the control panel, or do more 'clever things' such as dialing up a phone number.

Thanks to Kucher for the idea and suggestions.

(first version, so it may contain some bugs ;))

Couple of screenshots to give you an idea:


UPDATE:

v3 has a couple of changes:

. Allows to choose any image file (jpg, bmp, gif and png) for the embedded icon
. Display a preview on the image in the select list

v4 more changes:

. Big thumbnails
. Fix Cyrillic bug found by Vadim :)


Still to do... multilingual 8)
 

Attachments

  • Png2Exe.zip
    35 KB · Views: 319
  • Png2Exe_v3.zip
    35.4 KB · Views: 132
  • Png2Exe_v4.zip
    35.6 KB · Views: 1,268
Last edited:

dubidu

Senior Member
Apr 19, 2006
210
168
UK
it was your idea :)

I just realize it works with any image file (bmp, jpg, etc) so I'll remove the *.png filter and include all the other extensions

;)
 

Dmac1984

Senior Member
Really simple to use, takes 4 input values:

. Path of the original exe.
. Arguments to pass to the program.
. Path where the launcher will be created.
. Path for the PNG file used for the icon.

wonderfull app idea, just what ive been lookin for, just a few questions tho hopefully someone can help...

how do i find the argument to pass the program?

and im not able to pinpoint an image to use for the icon, i can see my folders but not the contents, what do i do?

and what size png images do i make for my htc hd2?

thanks
 

bsinclair

Senior Member
Apr 4, 2008
158
5
If I may suggest a small change, sometimes the argument is another exe file (as in astro gps launcher). Can you add the browse button also on the Arguments field?

Right now I am using first browsing the argument exe file (on exe path), then I cut it and paste on second field, then I browse again now for the real exe file.

Maybe add it also on Launcher Path field, so we don't need to type it. :)
 
Last edited:

vadim_bogaiskov

Senior Member
Sep 2, 2007
232
5
Moscow
Hallo, dubidu!

A. Bug report:
1. If the path to the exe-file contains Cyrillic, it is impossible to run the file, because path (inside launcher) has error, e.g. \\$;5H-48A:\\Program Files\\Yandex Fotki\\YandexFotki.exe (must be: \\Флеш-диск\\Program Files\\Yandex Fotki\\YandexFotki.exe)
2. I can to change the launcher name in line, but the file name remains unchanged.

B. There is Russian translation

Regards,
Vadim
 

Attachments

  • Png2Exe_ru.CAB
    118.7 KB · Views: 49
  • Png2Exe.gif
    Png2Exe.gif
    28.5 KB · Views: 151
Last edited:

dubidu

Senior Member
Apr 19, 2006
210
168
UK
excellent, not it will be multi language :)

I will add your test in the next build, I have to add the option for other images and include a thumbnail picture of the images, its easier to find the icon.

Txs to all the people who test it, and for that nice Txs for the Russian translation ;)
 

Corwin9S

Inactive Recognized Developer
Jan 20, 2009
892
156
www.i900playeraddict.com
great thing... I'll test it asap, sounds very more usefull than what I'm doing now to create .exe with icons (with visual studio) and it can be so easy made, on the fligh, over the phone.

tx++
 

dubidu

Senior Member
Apr 19, 2006
210
168
UK
Hallo, dubidu!

A. Bug report:
1. If the path to the exe-file contains Cyrillic, it is impossible to run the file, because path (inside launcher) has error, e.g. \\$;5H-48A:\\Program Files\\Yandex Fotki\\YandexFotki.exe (must be: \\Флеш-диск\\Program Files\\Yandex Fotki\\YandexFotki.exe)
2. I can to change the launcher name in line, but the file name remains unchanged.

B. There is Russian translation

Regards,
Vadim


Hallo Vadim,

Had a look at the Cyrillic path problem,
The reason was because I was manually converting the string to unicode (I know, lazy approach), so when you pass a path which is already in unicode, it will do it wrong (extra zeros)

The unicode for the "Флеш-диск" string should be:

00000000 24 04 3B 04 35 04 48 04 2D 00 34 04 38 04 $ ; 5 H - 4 8
0000000E 41 04 3A 04 A :

but what I generate is:

00000C78 5C 00 53 00 74 00 6F 00 72 00 61 00 67 00 \ S t o r a g
00000C86 65 00 20 00 43 00 61 00 72 00 64 00 5C 00 e C a r d \
00000C94 74 00 65 00 73 00 74 00 5C 00 24 00 3B 00 t e s t \ $ ;
00000CA2 35 00 48 00 2D 00 34 00 38 00 41 00 3A 00 5 H - 4 8 A :
00000CB0 5C 00 74 00 65 00 73 00 74 00 5C 00 5F 00 \ t e s t \ _
00000CBE 54 00 52 00 45 00 2E 00 65 00 78 00 65 00 T R E . e x e

I've changed the code to properly encode the string to Unicode, now the path "should" contain the valid characters

00000C78 5C 00 53 00 74 00 6F 00 72 00 61 00 67 00 \ S t o r a g
00000C86 65 00 20 00 43 00 61 00 72 00 64 00 5C 00 e C a r d \
00000C94 74 00 65 00 73 00 74 00 5C 00 24 04 3B 04 t e s t \ $ ;
00000CA2 35 04 48 04 2D 00 34 04 38 04 41 04 3A 04 5 H - 4 8 A :
00000CB0 5C 00 74 00 65 00 73 00 74 00 5C 00 5F 00 \ t e s t \ _
00000CBE 54 00 52 00 45 00 2E 00 65 00 78 00 65 00 T R E . e x e

(e.g.: 3B 04 rather than 3B 00)

v4 should have those changes, I did a quick test on the emulator with that nice Cyrillic string and it does work fine.

btw, thanks for testing ;)
 

vadim_bogaiskov

Senior Member
Sep 2, 2007
232
5
Moscow
Hallo Vadim,

Had a look at the Cyrillic path problem,
The reason was because I was manually converting the string to unicode (I know, lazy approach), so when you pass a path which is already in unicode, it will do it wrong (extra zeros)

The unicode for the "Флеш-диск" string should be:

00000000 24 04 3B 04 35 04 48 04 2D 00 34 04 38 04 $ ; 5 H - 4 8
0000000E 41 04 3A 04 A :

but what I generate is:

00000C78 5C 00 53 00 74 00 6F 00 72 00 61 00 67 00 \ S t o r a g
00000C86 65 00 20 00 43 00 61 00 72 00 64 00 5C 00 e C a r d \
00000C94 74 00 65 00 73 00 74 00 5C 00 24 00 3B 00 t e s t \ $ ;
00000CA2 35 00 48 00 2D 00 34 00 38 00 41 00 3A 00 5 H - 4 8 A :
00000CB0 5C 00 74 00 65 00 73 00 74 00 5C 00 5F 00 \ t e s t \ _
00000CBE 54 00 52 00 45 00 2E 00 65 00 78 00 65 00 T R E . e x e

I've changed the code to properly encode the string to Unicode, now the path "should" contain the valid characters

00000C78 5C 00 53 00 74 00 6F 00 72 00 61 00 67 00 \ S t o r a g
00000C86 65 00 20 00 43 00 61 00 72 00 64 00 5C 00 e C a r d \
00000C94 74 00 65 00 73 00 74 00 5C 00 24 04 3B 04 t e s t \ $ ;
00000CA2 35 04 48 04 2D 00 34 04 38 04 41 04 3A 04 5 H - 4 8 A :
00000CB0 5C 00 74 00 65 00 73 00 74 00 5C 00 5F 00 \ t e s t \ _
00000CBE 54 00 52 00 45 00 2E 00 65 00 78 00 65 00 T R E . e x e

(e.g.: 3B 04 rather than 3B 00)

v4 should have those changes, I did a quick test on the emulator with that nice Cyrillic string and it does work fine.

btw, thanks for testing ;)

Yes, this is the case (I just looked at the code :) ). Now the application works fine with Cyrillic pathnames! Thank you for your great app!

Russian translation for v.0.4 here.
See also http://4winphone.blogspot.com/2010/11/png2exe-png.html
 

Attachments

  • Png2Exe_ru.CAB
    119.7 KB · Views: 10
Last edited:

dubidu

Senior Member
Apr 19, 2006
210
168
UK
no cache, the tool takes the picture, converts it to an icon (64x64x256) and puts it inside a new exe. It would be there forever and ever until the end of the days (of the exe of course :))

Windows will cache the icon inside the exe, but that's normal, it does that for every single exe it loads (which was quite annoying while testing, was changing and changing the name of the exes so the icon was showed properly :)
 
Last edited:

evolutionqy7

Senior Member
May 10, 2010
870
29
Dublin
Samsung Galaxy Note 10
no cache, the tool takes the picture, converts it to an icon (64x64x256) and puts it inside a new exe. It would be there forever and ever until the end of the days (of the exe of course :))

Windows will cache the icon inside the exe, but that's normal, it does that for every single exe it loads (which was quite annoying while testing, was changing and changing the name of the exes so the icon was showed properly :)

now if you provided a nicer UI to make it switch icons faster would be perfect :D