Change EXE Icons: A Guide to Avoiding Errors
Resolving Icon Modification Errors in .EXE Files
Previously, we detailed the process of altering the icon associated with an .EXE file. However, users may encounter errors indicating a "non-standard resource layout," often stemming from the use of an "EXE compressor." This guide provides a solution to this issue.
The following steps will demonstrate how to decompress these files, enabling successful icon modification. We will also introduce an alternative program for this purpose.
Decompressing Compressed .EXE Files
Certain applications and programs utilize compression techniques to reduce file size. This compression can interfere with icon modification attempts.
To proceed, you'll need a decompression tool capable of handling these compressed .EXE files. Several options are available online.
Using IrfanView for Icon Modification
For demonstration purposes, we will utilize IrfanView, a versatile and widely-used image viewer and editor.
IrfanView offers functionality beyond simple image manipulation, including the ability to modify icons within .EXE files after decompression.
Step-by-Step Process
First, decompress the .EXE file using your chosen decompression tool. This will restore the file to its original, uncompressed state.
Once decompressed, you can then employ IrfanView or a similar program to replace the icon. The process is generally straightforward within these applications.
Ensure you save the modified .EXE file after replacing the icon to retain the changes.
Guest Author
This informative article was contributed by Sarah James, a valued member of our online forum.
Her expertise and insights have proven invaluable to our community, and we appreciate her contribution to this guide.
Modifying Icons in Compressed .EXE Files
IrfanView is a remarkably versatile image viewer, offering a wide array of functionalities. However, given its long-standing presence since the Windows 98 era, its default icons can appear somewhat dated. Altering the program's visual appearance is straightforward.
Users can simply select an alternative skin to achieve a more contemporary toolbar design, such as the aesthetically pleasing Windows 7 style toolbar available for download.
This transition results in a change from:
To this:
Despite this improvement, the original program icon remains unchanged, which can be undesirable.
Furthermore, IrfanView allows for the creation of attractive screensavers, as previously detailed. However, these screensavers often feature an unattractive 32x32 pixel icon. This is a noticeable aesthetic issue.
I had long desired to modify these icons, along with those of other compressed files, but was previously unable to do so. The primary obstacle was the inability to unpack the .exe file.
A significant acknowledgment is due to Phew on the IrfanView Forum. Without their contribution, the solution involving UPX would not have been discovered.
Essential Software for Icon Modification
Modifying the icons associated with executable files is achievable through the utilization of tools like icoFX or ResHack, often in conjunction with an unpacker such as UPX. My preference lies with icoFX for this purpose, specifically its older, freely available version.
Recent iterations of icoFX have transitioned to a shareware model, boasting an extensive array of features. While beneficial for custom icon and cursor creation, this functionality can be excessive for simple icon replacement tasks. For designing icons from scratch, image editing software like GIMP or Paintshop Pro are often more suitable.
The latest IcoFX2 version allows for 15 uses before the saving capability is disabled. This limitation is sufficient for following this guide and provides an opportunity to evaluate the software. However, version 1.6.4 remains available as freeware and functions flawlessly. It can be located on Filehippo, and a portable version is also accessible.
Furthermore, a collection of desirable icons is required for the process.
A highly recommended alternative for editing executable icons is Icon IrfanView, created by ~ncrow.
The selection of screensaver icons is largely a matter of personal preference. In this instance, icons from Another Monitor Dock Icons by MediaDesign were chosen.
The included PNG template allows for the creation of personalized icons as well.
Utilizing UPX with the Command Prompt
UPX functions as a utility accessible through the command prompt. For guidance on effectively using the command prompt, refer to available resources online. A convenient practice is to directly open the command prompt within the current working directory, avoiding the need to navigate through folders manually.
Instead of navigating from a default location like C:\Users\Sarah\ to a project directory such as D:\Irfanview Project, the command prompt can be launched directly within D:\Irfanview Project.
This approach streamlines the workflow considerably.
The installation of UPX is performed by right-clicking the upx.exe file and selecting "Run as administrator." A command window will briefly appear during the installation process. A system restart may be required for the changes to take effect.
With UPX installed, you can proceed to unpack I_view.exe and Slideshow.exe. Begin by navigating to the Irfanview program folder, typically located at C:\Program Files\Irfanview. Copy I_view.exe into your designated working folder.
Next, browse to C:\Program Files\Irfanview\Plugins and copy Slideshow.exe to the same working folder. Create a new folder within your working directory, naming it "Icons." Then, right-click within this "Icons" folder and select "Command Prompt Window here."
Within the command prompt window, type the command upx -d i_view32.exe.
Press the Enter key to initiate the unpacking process of the executable file.
Repeat this procedure for Slideshow.exe to unpack that file as well.
Modifying Application Icons
Begin by transferring the desired PNG image files into the designated 'Icons' directory. Subsequently, launch IcoFX. This guide utilizes IcoFX version 1.6.4. Personal conversion of PNG files to icons is recommended for format control, though pre-existing ICO files can also be employed.
Batch Processing with IcoFX
Navigate to the 'Tools' menu and select 'Batch Process...'.
A comprehensive set of options will appear. Ensure the 'Create icons from Images' checkbox is selected. Utilize the 'Add' button to incorporate the PNG files intended for icon conversion.
Below the file selection area, a variety of image formats are listed. Typically, selecting 'XP colors' is sufficient. It’s crucial to enable the '128x128' option.
Omitting the 128x128 format can result in icons displaying at 48x48 resolution in Vista when 'Large Icons' view is chosen within Explorer.
The inclusion of 256 color and 16 color options is optional, depending on the target operating systems. While they enhance compatibility, they also increase file size. Given modern storage capacities, this increase is often negligible.
Click 'OK' to initiate the conversion process. The resulting icon files will be ready for use shortly.
Modifying Program Icons
We can now proceed to alter the icons within the application itself.
Navigate to Tools > Resource Editor ...
This action will launch a blank window, as illustrated below:
Utilize the yellow "Open File" icon to locate i_view32.exe within your designated working directory and select Open. All icons embedded within the executable will then become visible.
While you have the capability to modify each icon, this tutorial will focus on changing only the primary one.
It's worth noting that Irfanview also stores its file icons within Icons.dll, found in the plugins folder. These icons can also be customized to your preference!
Perform a right-click on the initial icon and choose the "Change" option.
Browse to the location of your desired icon and click Open.
Your new icon is now displayed.
Proceed to click the blue save button to apply the changes.
A successful save operation will be indicated by the message "File saved successfully!".
Select OK to continue.
Repeat this process for Slideshow.exe.
Following this, examine the contents of your working folder.
The executable files will now feature the newly assigned icons, while the original icons have been automatically backed up with a ".bak" extension appended to their filenames.
I have assigned a black recycle bin icon to .bak files, though you may observe a generic icon and the ".bak" extension after the filename.
In some instances, the updated icons may not be immediately visible due to Windows caching the older image. A system restart typically resolves this issue, so no further action is needed at this stage.
Executable File Compression
For users seeking to optimize storage space, the executable files can be compressed. Navigate to your working directory using the command prompt, and then execute the command upx i_view32.exe.
Similarly, to compress the slideshow executable, utilize the command upx slideshow.exe.
Replacing Existing Files
Following compression, the updated i_view32.exe and slideshow.exe files should be copied.
These files are to be placed within the IrfanView program folder, effectively replacing the original executables. Alternatively, the original files can be relocated as a backup measure.
Verifying New Icon Implementation
The next step involves confirming whether the recently generated screensavers correctly display the updated slideshow icon. Examination of the program icon itself is straightforward; it's visible in the upper-left corner upon launching Irfanview.
Begin by initiating Irfanview, then access the slideshow menu via the second button located on the left side of the interface.
The most recently saved slideshow menu will then be presented to you. Further details regarding this process can be found in the tutorial available at 7tutorials.
Proceed to save the slideshow as a screensaver. Subsequently, inspect the folder where the file was saved to verify its appearance.
Final Thoughts
As demonstrated, even legacy software can be adapted to align with the visual styles of Windows Vista and Windows 7. This allows excellent programs, such as IrfanView, to remain a valuable and contemporary component of your computing environment.
IrfanView can be conveniently downloaded through Ninite.