版权声明: 可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息。
有时我们会遇到同一软件在目标机上安装完成后,在桌面创建的快捷方式图标未更新,导致该问题原因是Windows刷新机制,如果安装测试遇到这种情况,保险起见,在OnEnd添加如下代码,我们主动通知Windows刷新桌面。
#include "ifx.h"
//Call to Windows used in the "OnEnd" function to refresh the desktop
prototype Shell32.SHChangeNotify(LONG, LONG, POINTER, POINTER);
// -- Add the following to the "OnEnd" function
//Refresh the desktop to display icons (or remove if uninstall)
SHChangeNotify(134217728, 0, NULL, NULL);
//Call to Windows used in the "OnEnd" function to refresh the desktop
prototype Shell32.SHChangeNotify(LONG, LONG, POINTER, POINTER);
// -- Add the following to the "OnEnd" function
//Refresh the desktop to display icons (or remove if uninstall)
SHChangeNotify(134217728, 0, NULL, NULL);