0

How To Extract or Save the Icon from an EXE File

Posted by Anna Middleton on June 26, 2019
how to extract the icon from an exe file

The file format typically used for icons is ICO. What makes it interesting is that it isn’t a typical image format, but instead embeds various image sizes and types into the file, along with different color depths.

For this reason, an icon can look the same on 640 x 480-pixel and 4K monitors, if the appropriate formats are embedded in the file.

That’s why extracting an icon from an EXE file is not an easy task. Thanks to various apps, you can convert any version of an executable file’s icon to an image in a few simple clicks. This article will explain to you how to do it.

EXE to Image Tools

The best way to extract icons from an EXE file to an image file is to use some of the third-party ’exe-to-image’ tools. They all work on the same principle.

First, they extract the icon image from an EXE file to an ICO file. Then, since ICO files are not image files, they perform one extra step and convert it to PNG or other image formats.

You can find various tools online that can extract an icon to an ICO file, but only a few of them will directly extract an image from the binary file.

Best Tools to Extract Icons

These are some of the most efficient and user-friendly icon-to-image extracting tools on the internet.

1. IconViewer

IconViewer is one of the oldest icon-extracting tools. It was last updated in 2008, but it is compatible with Win 10. Also, you are going to need to install it, which is convenient for people who need to use it often. On the other hand, it may take up unnecessary space to those who want to use it only once or twice.

To save the icon you need to:

  1. Right-click the EXE or DLL file.
  2. Click on ’Properties.’
  3. Select the ’Icons’ tab. You’ll see all the icons tied to that file.
  4. Click on the icon that you want to extract.
  5. Choose the proper image size and color depth from the ’Device images’ menu. It is below the icon window.
  6. Click the ’Save’ icon underneath.
    iconviewer
  7. Choose the location of the new image and the desired image format (BMP or PNG).
  8. The tool will then automatically extract the icon from the EXE file.

There is also an option to select multiple EXE files and when you repeat the steps 1-3, you’ll see all of their embedded icons in the same window.

2. IconsExtract

Unlike IconViewer, IconsExtract is a stand-alone EXE file that doesn’t require any installation. Just download it and run it.

Right after you launch it, a ’Search for icons’ window will appear where you’ll need to select the files and cursors that you want to scan. There’s also an option to filter out unnecessary icon sizes and choose formats, and color depth.

You can search for an individual file by typing its name in the box or by browsing the file explorer. There’s also an option to scan entire folders with their subfolders for the executable files. You can even perform a scan of entire hard disk partitions. However, this may take up a lot of memory and can take for a long time.

iconsextract

To save the icons, you should:

  1. Select all the icons you want to extract.
  2. Click on the ‘File’ menu.
  3. Select the ‘Save Selected Icons’ option.
  4. Locate the folder that you want to save the image files to.
  5. Click on the ‘Save Icons’ button.

You can also copy an icon to a clipboard and paste it to another app, such as Microsoft Word, Adobe Photoshop, Paint, etc.

3. QuickAny2Ico

Quick Any2Ico is probably the most user-friendly of the bunch. It has a simple user interface and doesn’t require any installation. Just download it and launch it.

When you run the tool, you’ll notice three boxes – one to select an executable file, one to select the destination for the extracted icon, and the third for extracting options.

There is also a possibility to extract the icon by just dragging and dropping the executable to the tool. It will automatically locate the path of the file and you can hit ‘Extract it’ button to start the process.

4. Thumbico

This app isn’t limited to extracting icons only from executable files. You can locate any file type and Thumbico will convert the file icon to an image.

Also, the app has some interesting features like rotating/flipping the image, choosing the background color and size. There’s also an option to save an image as a GIF and JPG, besides the usual PNG and BMP formats.

This app comes in a portable version which you can launch immediately after downloading. But you can also get the installer which provides some additional features.

thumbico

Extract EXE File to Icon Using PowerShell

If you don’t want to use any tools, you can manually extract the icon from an executable using Microsoft PowerShell. This is only possible on Windows 10 and you can only extract to an ICO file.

To do so, first, copy this code to the PowerShell:

Get-Icon -folder c:\exelocation -name

#>

Function Get-Icon {

[CmdletBinding()]

Param (

[Parameter(Mandatory=$True,HelpMessage=”Enter the location of the .EXE file”)]

[string]$folder

)

[System.Reflection.Assembly]::LoadWithPartialName(‘System.Drawing’)  | Out-Null

md $folder -ea 0 | Out-Null

dir $folder *.exe -ea 0 -rec |

ForEach-Object {

$baseName = [System.IO.Path]::GetFileNameWithoutExtension($_.FullName)

Write-Progress “Extracting Icon” $basename

[System.Drawing.Icon]::ExtractAssociatedIcon($_.FullName).ToBitmap().Save(“$folder\$basename.ico”)

}

}

Type ‘Get-Icon-Folder [the location of the executable file]’ instead of ‘Get-Icon -folder c:\exelocation –name.’

This code will extract the icon from the executable file and create an ICO file in the same directory.

Extracting Is Easier with the Tools

Even if the PowerShell method exists, it is much easier to get one of the third-party tools and let them do the work. Not only will they convert the icon to an image file, but you can also customize the type, size, and color depth.

However, if you want only an ICO file or you don’t like third-party tools, you can try out the PowerShell option too.

Which icon extracting software did you like the most? Do you use PowerShell to extract your icons? Write a comment below and let us know.

Leave a Reply

Your email address will not be published. Required fields are marked *


Disclaimer: Some pages on this site may include an affiliate link. This does not effect our editorial in any way.