>bat注销重启
@echo off
taskkill /f /im explorer.exe && explorer
pause
>bat 脚本强制刷新桌面
@echo off
@taskkill /im explorer.exe /f
@start explorer.exe
@exit
**扩展** NSIS 安装程序安装成功后强制刷新桌面图标,在打包脚本中加入以下代码
!include "FileFunc.nsh"
${RefreshShellIcons}
本文介绍如何通过BAT脚本强制刷新Windows桌面图标,包括注销重启和仅刷新桌面两种方式。此外,还提供了在NSIS安装程序中集成桌面图标刷新功能的方法,确保安装后桌面图标立即更新。
>bat注销重启
@echo off
taskkill /f /im explorer.exe && explorer
pause
>bat 脚本强制刷新桌面
@echo off
@taskkill /im explorer.exe /f
@start explorer.exe
@exit
**扩展** NSIS 安装程序安装成功后强制刷新桌面图标,在打包脚本中加入以下代码
!include "FileFunc.nsh"
${RefreshShellIcons}

被折叠的 条评论
为什么被折叠?