RfshDktp是NSIS刷新桌面图标的插件

/*
RfshDktp是NSIS刷新桌面图标的插件
RfshDktp用于桌面图标需要刷新的情况,也可以直接使用API进行刷新操作.
*/
!AddPluginDir "."
; The name of the installer
Name "Refresh Desktop"
; The file to write
OutFile "rfshdktp.exe"
; The default installation directory
InstallDir "$PROGRAMFILESRefresh Desktop"
;--------------------------------
; Pages
Page directory
Page instfiles
;--------------------------------
; The stuff to install
Section "" ;No components page, name is not important
 ; Set output path to the installation directory.
 SetOutPath $INSTDIR
 ; Put file there
 File "${NSISDIR}makensisw.exe"
 SetShellVarContext all
 CreateShortCut "$DESKTOPMakeNSIS.lnk" "$INSTDIRmakensisw.exe"
 SetShellVarContext current
 CreateShortCut "$DESKTOPMakeNSIS.lnk" "$INSTDIRmakensisw.exe"
 ; seems to be needed to allow the shortcuts to mess up before refreshing them
 Sleep 2000
 ; call the DLL to refresh the desktop
 rfshdktp::refreshDesktop
 ; 直接使用API进行刷新操作
 System::Call 'shell32::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
 ; never could get this to work
 ;SendMessage 65535 26 0 0
SectionEnd ; end the section
© 版权声明
THE END
喜欢就支持一下吧
点赞12 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容