Created
October 10, 2024 22:28
-
-
Save MarkTiedemann/366826ff4bb6854e710a9d5180a46bdd to your computer and use it in GitHub Desktop.
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
[System.Reflection.Assembly]::LoadWithPartialName('System.Drawing') | Out-Null; | |
$Icon = [System.Drawing.Icon]::ExtractAssociatedIcon( | |
[System.Environment]::ExpandEnvironmentVariables('%SystemRoot%\System32\newdev.exe') | |
); | |
$Stream = [System.IO.File]::Open( | |
'newdev.ico', | |
[System.IO.FileMode]::CreateNew | |
); | |
$Icon.Save($Stream); | |
$Stream.Dispose(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment