Refresh shell icons: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
m (Updated author and download links, and changed format of some pages.)
m (Updated author links.)
Line 1: Line 1:
{|align=right
|<small>Author: [[{{ns:2}}:jerometremblay|jerometremblay]] ([[{{ns:3}}:jerometremblay|talk]], [[{{ns:-1}}:Contributions/jerometremblay|contrib]])</small>
|}
<br style="clear:both;">
== How To Use ==
== How To Use ==
After changing file associations, you can call this macro to refresh the shell immediatly. It calls the shell32 function [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shchangenotify.asp SHChangeNotify]. This will force windows to reload your changes from the registry.
After changing file associations, you can call this macro to refresh the shell immediatly. It calls the shell32 function [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shchangenotify.asp SHChangeNotify]. This will force windows to reload your changes from the registry.
Line 15: Line 19:
   (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)'
   (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)'
FunctionEnd</highlight-nsis>
FunctionEnd</highlight-nsis>
Page author: [[User:jerometremblay|jerometremblay]]

Revision as of 03:02, 30 April 2005

Author: jerometremblay (talk, contrib)


How To Use

After changing file associations, you can call this macro to refresh the shell immediatly. It calls the shell32 function SHChangeNotify. This will force windows to reload your changes from the registry.

Call RefreshShellIcons

The Function

!define SHCNE_ASSOCCHANGED 0x08000000
!define SHCNF_IDLIST 0
 
Function RefreshShellIcons
  ; By jerome tremblay - april 2003
  System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v \
  (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)'
FunctionEnd