是否可以使用 Inno Setup 中的刷新桌面[Code]
部分?
要么通过使用SendMessage
或以某种方式使用SHChangeNotify
?
您可以通过在适当的 DLL 中调用 Windows API 中的任何函数来调用它。 Pascal DLL 语法已记录here http://www.jrsoftware.org/ishelp/topic_scriptdll.htm。的文档SHChangeNotify http://msdn.microsoft.com/en-us/library/bb762118(VS.85).aspx像往常一样在 MSDN 上找到函数。该函数位于Shell32.dll
(没有惊喜!)。
[Code]
const
SHCNE_ASSOCCHANGED = $08000000;
SHCNF_IDLIST = $00000000;
procedure SHChangeNotify(wEventID: integer; uFlags: cardinal; dwItem1, dwItem2: cardinal);
external '[email protected] /cdn-cgi/l/email-protection stdcall';
procedure SendChangeNotification;
begin
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, 0, 0);
end;
现在你可以打电话SendChangeNotification
任何你喜欢的地方,例如在事件函数 http://www.jrsoftware.org/ishelp/topic_scriptevents.htm.
Update
上面的文字回答了您的问题,如何“使用 Inno Setup 中的 Inno Setup 刷新桌面”[Code]
但是您知道 Inno Setup 可以自动为您刷新桌面吗?只需编写
ChangesAssociations=yes
in the [Setup]
部分。看:ChangesAssociations https://jrsoftware.org/ishelp/index.php?topic=setup_changesassociations
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)