Created
September 11, 2026 20:06
-
-
Save fabd/ff58befc2876ea14a0b87aa948295faf to your computer and use it in GitHub Desktop.
Repair missing shortcut icons for Steam games (can happen after moving installation of Steam)
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
| # ------------------------------------------------------------------------------- | |
| # | |
| # Script to repair missing icons after moving Steam. | |
| # | |
| # If you follow this Steam Support guide | |
| # https://help.steampowered.com/en/faqs/view/4BD4-4528-6B2E-8327#exist | |
| # | |
| # ... it will break your icons because the icons are only downloaded when the | |
| # game is installed. Short of reinstalling, this script will pull the .ico | |
| # files. | |
| # | |
| # ... Ideally you'd want to preserve also the (steam path)\steam\games\ folder | |
| # when moving Steam installation, so you don't lose the icons. | |
| # | |
| # If they are already gone, then the script below can pull them without having | |
| # to reinstall the games. | |
| # | |
| # - Make sure to update path in 2nd line to your Steam install | |
| # - Will download icons only for shortcuts currently on desktop | |
| # - After running, in Task Manager, Restart Explorer to refresh the icons | |
| # | |
| # ------------------------------------------------------------------------------- | |
| $desktop = [Environment]::GetFolderPath("Desktop") | |
| $gamesFolder = "E:\Steam\Steam\steam\games" | |
| if (-not (Test-Path $gamesFolder)) { New-Item -Path $gamesFolder -ItemType Directory -Force } | |
| Get-ChildItem -Path $desktop -Filter "*.url" | ForEach-Object { | |
| $text = Get-Content $_.FullName -Raw | |
| $appId = $null | |
| if ($text -match 'URL=steam://rungameid/(\d+)') { | |
| $appId = $Matches[1] | |
| } | |
| if ($appId -and $text -match '([a-f0-9]{32,40}\.ico)') { | |
| $icoFile = $Matches[1] | |
| # $url = "https://cdn.cloudflare.steamstatic.com/steamcommunity/public/images/apps/$appId/$icoFile" | |
| $url = "https://shared.fastly.steamstatic.com/community_assets/images/apps//$appId/$icoFile" | |
| $dest = Join-Path $gamesFolder $icoFile | |
| if (-not (Test-Path $dest)) { | |
| Write-Host "`n`nDownloading $icoFile (url $url) for AppID $appId..." | |
| try { | |
| Invoke-WebRequest -Uri $url -OutFile $dest | |
| Write-Host "Saved to $dest" -ForegroundColor Green | |
| } catch { | |
| Write-Host "Failed to download $icoFile" -ForegroundColor Red | |
| } | |
| } | |
| } | |
| } |
Author
Author
For context a Steam game shortcut on desktop looks like this :
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,0
[InternetShortcut]
IDList=
IconIndex=0
URL=steam://rungameid/4436220
IconFile=E:\Steam\Steam\steam\games\ebab049aab368246c4735a261efc06e79e4ffb7a.ico
So if an icon is blank it may be the .ico file in (steam path)\steam\games\ folder is not present.
This icon is NOT recreated when using "Verify Integrity of Files" for a game. It seems to be downloaded only on game installation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To run PowerShell script in Terminal :
powershell.exe -ExecutionPolicy Bypass -File fix-steam-icons.ps1