Searching in the Documentation I couldn't find that:
Is it possible to close an application or kill a process with Rainmeter?
It is currently April 24th, 2024, 12:13 pm
Can I close an application with Rainmeter?
-
- Posts: 46
- Joined: January 29th, 2010, 3:39 pm
-
- Developer
- Posts: 2872
- Joined: April 17th, 2009, 12:18 pm
Re: Can I close an application with Rainmeter?
You could use nircmd (http://www.nirsoft.net/utils/nircmd.html) and then
Remember to replace PATH with path to nircmd.exe
Code: Select all
!execute ["PATH\nircmd.exe" killprocess process.exe]
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Can I close an application with Rainmeter?
Not with native Rainmeter, but there are tons of little "kill" utilities out there (or an AutoIt3 / nircmd script) that could be used with your skin like this:
LeftMouseAction=!Execute ["KillApp.exe" "processnametokill"]
LeftMouseAction=!Execute ["KillApp.exe" "processnametokill"]
-
- Posts: 46
- Joined: January 29th, 2010, 3:39 pm
Re: Can I close an application with Rainmeter?
Nice. TY all!
-
- Developer
- Posts: 1270
- Joined: April 3rd, 2009, 4:31 am
- Location: NC, US
Re: Can I close an application with Rainmeter?
Also if you prefer to be nice about it, some applications have a commandline argument to exit the application, you would send it like any command.
-
- Posts: 1140
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: Can I close an application with Rainmeter?
I don't suppose Rainmeter has been updated to support this?
EDIT: I found out how to do this via .bat file. But would be a good to know if Rm has had this function added or not.
EDIT: I found out how to do this via .bat file. But would be a good to know if Rm has had this function added or not.
- MuLab -
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Can I close an application with Rainmeter?
It does not. Rainmeter has no native way to close an application other than itself. There is no good safe way to do that, since a great many processes in Windows would be fairly disastrous to kill while Windows is running.
I would think a Powershell or cmd.exe Taskkill command in a RunCommand measure would work good for this. I'd be hesitant to call an external .bat file.
-
- Posts: 1140
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away
Re: Can I close an application with Rainmeter?
Hmm, ok, Thanks, I'll look into that. Perhaps it's easier to just stick with NirCMD then?jsmorley wrote: ↑July 31st, 2021, 12:01 pm It does not. Rainmeter has no native way to close an application other than itself. There is no good safe way to do that, since a great many processes in Windows would be fairly disastrous to kill while Windows is running.
I would think a Powershell command in a RunCommand measure would work good for this. I'd be hesitant to call an external .bat file.
- MuLab -
-
- Developer
- Posts: 22629
- Joined: April 19th, 2009, 11:02 pm
- Location: Fort Hunt, Virginia, USA
Re: Can I close an application with Rainmeter?
Nah, it's easy to do in Powershell or cmd.exe using RunCommand.
-
- Posts: 1140
- Joined: February 17th, 2011, 7:45 pm
- Location: a Galaxy S7 far far away