Posted On September 22, 2020

Windows 10 Missing Icons Problem

kimconnect 0 comments
blog.KimConnect.com >> Codes >> Windows 10 Missing Icons Problem

This sometimes happen when a certain app takes over icons cache in Windows, such as some antivirus software. Here’s how to reset that:

Run PowerShell or CMD as Administrator:

function fixWindowsIcons{
    Stop-Process -ProcessName explorer -force
    remove-item "$env:localappdata\IconCache.db" -force
    remove-item "$env:localappdata\Microsoft\Windows\Explorer\iconcache*" -force    
    $keyname='IconHandler'
    $iconHandlerKey="REGISTRY::HKLM\SOFTWARE\Classes\lnkfile\shellex\$keyname"
    $iconHandlerExpectedValue='{00021401-0000-0000-C000-000000000046}'
    $defaultIconHandler=(get-itemproperty $iconHandlerKey).'(default)'
    if($iconHandlerExpectedValue -ne $defaultIconHandler){
        New-ItemProperty -path $iconHandlerKey -name $keyname -value $iconHandlerExpectedValue
    }
    start-process -processName explorer.exe
    write-warning 'Please restart the computer to finish resetting Windows Icons cache...'
    }
fixWindowsIcons

Leave a Reply

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

Related Post

PowerShell: How to Properly Delete a Msol User Account

# Set the user ObjectID attribute variable$msolUser="6f2fcfcd-...."# Move user account to Recycle BinRemove-MsolUser -ObjectId $msolUser#…

PowerShell: Connecting via WinRM with a Timeout

$credentials=get-credential $sessionTimeout=New-PSSessionOption -OpenTimeout 120000 # 2 minutes $sessionIncludePort=New-PSSessionOption -IncludePortInSPN -OpenTimeout 120000 $session=if($credentials){ try{ New-PSSession -ComputerName…

Recommended Skill Set of a Programmer

It's a given that a coder needs to learn how to code... like really well.…