Installshield在安装结束时刷新系统

在OnEnd里添加代码,两种解决方案

方案一:

#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);

方案二:

SHChangeNotify(SHCNE_ASSOCCHANGED,   SHCNF_FLUSHNOWAIT,0,0);

此类需求多见于文件关联之类的动作,文件关联后操作系统并不能马上将文件的图标刷新为关联程序的图标,需要手动刷一下

原文地址:https://www.cnblogs.com/BeyondTechnology/p/1851664.html