简体   繁体   中英

How can I kill System Tray icon application?

I need to stop and kill a system tray icon application in NSIS scriptes ?

KillProcDLL::KillProc "xyz.exe"
KillProcDLL::KillProc "xyz"
nsisDDE::Execute "xyz-{D30034F8-AB97-419F-B3B6-FA5BB8CD926F}" "[Quit]"
nsisDDE::Execute "xyz" "[Quit]"
nsisDDE::Execute "D30034F8-AB97-419F-B3B6-FA5BB8CD926F" "[Quit]"

all above didn't works ?

KillProcDLL in 32-bit NSIS cannot kill a 64-bit process, you must use KillProcWMI .

Killing a process is not ideal, it is better to use the LockedList plug-in or use FindWindow + SendMessage $window ${WM_CLOSE} 0 0 to gently close the application.

FindWindow can only be used if the window has a unique window class. Use Spy++ (Visual Studio), WinSpy++ or WinSpyEx to find the window class.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM