Last active
September 20, 2021 14:33
-
-
Save kevduc/9601d910373d95ffe9b528b666a2e4b6 to your computer and use it in GitHub Desktop.
Extract the icon of an exe file using PowerShell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on https://community.spiceworks.com/topic/592770-extract-icon-from-exe-powershell | |
[System.Reflection.Assembly]::LoadWithPartialName('System.Drawing') | Out-Null | |
[System.Drawing.Icon]::ExtractAssociatedIcon('full-path-to/file.exe').ToBitmap().Save('full-path-to/icon.ico') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment