I'm using NSIS, and I have the exact same problem as covered in the following forum link. That is, I want to close down all explorer.exe windows, though not explorer.exe itself.
Here's the link:
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.
Here's the code (which I tried, and no explorer windows are closed... ideas?):
!Include WinMessages.NSH
Name ""
OutFile "exrunning.exe"
Section "Explorer running?"
FindWindow $R0 ExploreWClass
IsWindow $R0 ExRunning
Abort
ExRunning:
MessageBox MB_OK "ex running"
SendMessage $R0 ${WM_SYSCOMMAND} 0xF060 0
SectionEnd