I never understood why so many developers--people who generally have no visual design sense--decided that the orange Visual Studio Code icon was where they would take their stand.
I liked the orange, for a few reasons:
- It stood out from my purple Visual Studio icon.
- It was bold.
- I don't have some childhood trauma related to orange.
On Windows, it's not practical to change the icon completely back to orange. That would require modifying the code.exe file. But you can get most of the way there. The steps below will change the icon for:
- Right-click folder/file > Open with VS Code
- Right-click pinned shortcut > Visual Studio Code
It won't change the icon in the VS Code editor, or in context menu
Right-click pinned shortcut > New Window
Here's a 7z file with the orange icons and Powershell script.
Replace the VS Code icons
There are three icons in
C:\Program Files\Microsoft VS Code\resources\app\resources\win32. Backup and replace all three with the same sizes and names. For the .png files, Paint.Net will work. For the .ico file, I like Greenfish Icon Editor Pro.
Update the Registry
There are four registry keys that point to Code.exe for the icon. Change these to
C:\Program Files\Microsoft VS Code\resources\app\resources\win32\code_file.ico.
Here's a Powershell script.
$path = "C:\Program Files\Microsoft VS Code\resources\app\resources\win32\code_file.ico" New-PSDrive -PSProvider registry -Root HKEY_CLASSES_ROOT -Name HKCR Write-Output "Setting..." Set-ItemProperty -LiteralPath "HKCR:\*\shell\VSCode" -Name Icon -Value $path Set-ItemProperty -Path HKCR:\Directory\Background\shell\VSCode -Name Icon -Value $path Set-ItemProperty -Path HKCR:\Drive\shell\VSCode -Name Icon -Value $path Set-ItemProperty -Path HKCU:\Software\Classes\Directory\shell\VSCode -Name Icon -Value $path Write-Output "Finished." Pause
Use a Shortcut to Open VS Code
- Right-click in a folder, choose New > Shortcut
- Item location:
"C:\Program Files\Microsoft VS Code\Code.exe"
- Name: "VS Code"
- Right-click the shortcut, click Change Icon.
C:\Program Files\Microsoft VS Code\resources\app\resources\win32\code_file.ico
You can now drag this icon into the task bar to pin it.