Solve the problem that the Win10 desktop icon/start menu tile icon turns white

I added a hard drive to the computer today, and then migrated the operating system to the new hard drive, thinking everything went well. But after opening the start menu , I found that the icons of the tiles have become white. Similar to the following:
(I have already repaired it. There was no screenshot at the time, so I found the network map)
Since I have encountered it before, most of the methods given are to delete Iconcache.db. I tried it and it didn’t work. Then restart explorer.exe, and all icons are restored (including desktop icons). Write a bat file and save it, and run it directly when a similar situation occurs, similar to the effect of refreshing.
code show as below:

@echo off
taskkill /f /im explorer.exe
CD /d %userprofile%\AppData\Local
DEL IconCache.db /a
start explorer.exe
cho 执行完成

1. Create a .txt file,
2. Write the above code into the .txt file,
3. Change the suffix of the .txt file to a .bat file,
4. Double-click to run,
5. Solve the problem.

Guess you like

Origin blog.csdn.net/m2607219640/article/details/123237791