It is currently September 20th, 2019, 8:28 am

Can I close an application with Rainmeter?

Help with creating, editing & fixing problems with skins
Sunspot2
Posts: 46
Joined: January 29th, 2010, 3:39 pm

Can I close an application with Rainmeter?

Sunspot2 » June 2nd, 2010, 5:12 pm

Searching in the Documentation I couldn't find that:

Is it possible to close an application or kill a process with Rainmeter?
poiru
Developer
Posts: 2877
Joined: April 17th, 2009, 12:18 pm

Re: Can I close an application with Rainmeter?

poiru » June 2nd, 2010, 5:14 pm

You could use nircmd (http://www.nirsoft.net/utils/nircmd.html) and then

Code: Select all

!execute ["PATH\nircmd.exe" killprocess process.exe]
Remember to replace PATH with path to nircmd.exe
User avatar
jsmorley
Developer
Posts: 19461
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Can I close an application with Rainmeter?

jsmorley » June 2nd, 2010, 5:16 pm

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"]
Sunspot2
Posts: 46
Joined: January 29th, 2010, 3:39 pm

Re: Can I close an application with Rainmeter?

Sunspot2 » June 2nd, 2010, 5:19 pm

Nice. TY all!
dragonmage
Developer
Posts: 1286
Joined: April 3rd, 2009, 4:31 am
Location: NC, US

Re: Can I close an application with Rainmeter?

dragonmage » June 5th, 2010, 4:11 pm

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.