From NSIS Wiki
|Author: scully13 (talk, contrib)|
The zip file contains the DLL, the VC++ 6.0 source code and an example NSIS script for using the DLL. The script has an example of when the desktop shortcuts get messed up and need refreshing.
The refresh desktop plugin does just what it says. A few people said they were able to do it using a SendMessage but that never seemed to work for what I needed it for. From time to time Windows seemed to have a bug when creating a desktop shortcut. It would cause an extra shortcut to show up on the desktop that wasn't valid. Hitting F5 or right-clicking and choosing Refresh always made it go away so I made this DLL to handle that.
; call the DLL to refresh the desktop rfshdktp::refreshDesktop
More recently I've seen in the discussion forum where some people used this instead:
System::Call 'shell32::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)'
I tried it against my test in the example and it worked fine. So, you might want to just try using the System::Call line. Especially, if you are already using the system plugin elsewhere in the same script. After all they both end up calling the same thing so they should be interchangeable.