Name "Close & Quit a program" Caption "Close & Quit" OutFile "Close & Quit Test.exe" InstallDirRegKey HKCU "Software\WinAmp" "" Section "" FindWindow $R0 "BaseWindow_RootWnd" ;SendMessage $R0 ${WM_QUIT} "" "" SendMessage $R0 ${WM_CLOSE} "" "" SectionEnd