Skip to content
⌘ NSIS Forum Archive

Minimize all

10 posts

0mar#

Minimize all

Hey guys & gals. 🙂

I was just wondering if there's a simple way to minimize all currently open windows via NSIS?

I'm pretty sure it's not in the docs (makensis.htm) or functions (functions.htm), and I've searched the forum too but haven't found anything.

Anyone have any ideas?

Thanks. 😁
0mar#
Nobody has any ideas? 😱

I thought at the very least someone would say: "You can't do that with NSIS, you'd need to make a .dll that makes the following winAPI calls...". And then I would say: "Thanks, I guess I'll just do without it for now."

So anyone want to complete this little exchange? 😉

*chuckle*
sdbarker#
"You can't do that with NSIS, you'd need to make a .dll that makes the following winAPI calls...". And then I would say: "Thanks, I guess I'll just do without it for now."

-Scott
externe#edited
Hello, I just found that :

LINK ON MSDN

file : minimize.vbs

dim objShell
set objShell = CreateObject("Shell.Application")
objShell.MinimizeAll
set objShell = nothing
And you can do :


section "Install"

SetOutPath $TEMP
File "minimizeall.vbs"
Exec '"$SYSDIR\wscript.exe" $TEMP\minimizeall.vbs'

sectionend
Anders#
with the system plugin:
http://forums.winamp.com/showthread....59#post1386259 (example at the bottom)
externe#
Oh yes, the kichik's code work perfect.
But... wouaouh... I don't understand any line !
🙂
Takhir#
BTW this also works

FindWindow $0 "Shell_TrayWnd"
SendMessage $0 0x0111 415 0
;System::Call 'user32::PostMessage(i r0, i 0x0111, i 415, i 0) i .r1'

SendMessage works fine, but I read that Post is better in this case (but I cannot remember why 🙂
externe#
Hey thanks Takhir, works nice,

How you know what "0x0111 415 0" mean ?

I try to find info on Shell_TrayWnd at MSDN, but I can't find.

Bye,
🙂


Outfile "minimize2.exe"

section "Install"

FindWindow $0 "Shell_TrayWnd"
SendMessage $0 0x0111 415 0

sectionend
Takhir#
Shell_TrayWnd is tray bar window class type, you can see this using Spy++ utility (find window and so on)

<WINUSER.H>
#define WM_COMMAND 0x0111

415 is not documented feature, but while "Minimize All" popup menu item (tray bar mouse click) appears, this should have some internal code, and code is 415 🙂