HOWTO:安装完成后刷新Windows桌面

版权声明: 可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息。

有时我们会遇到同一软件在目标机上安装完成后,在桌面创建的快捷方式图标未更新,导致该问题原因是Windows刷新机制,如果安装测试遇到这种情况,保险起见,在OnEnd添加如下代码,我们主动通知Windows刷新桌面。

#include "ifx.h"  
//Call to Windows used in the "OnEnd" function to refresh the desktop 
prototype Shell32.SHChangeNotify(LONGLONGPOINTERPOINTER);

// -- Add the following to the "OnEnd" function
//Refresh the desktop to display icons (or remove if uninstall) 
SHChangeNotify(1342177280NULLNULL);
原文地址:https://www.cnblogs.com/wanbinghong/p/1834649.html