It is currently March 28th, 2024, 6:05 pm

Query/Monitor Windows Services?

Get help with creating, editing & fixing problems with skins
Post Reply
fletch8527
Posts: 1
Joined: March 26th, 2018, 5:59 pm

Query/Monitor Windows Services?

Post by fletch8527 »

Pretty new to Rainmeter. I actually stumbled upon it while looking for some sort of GUI to monitor a Windows service. Seems like it should work but I'm not exactly sure how I would make a skin to monitor the status of a windows service. I was going to have the skin also act like a button to toggle the state. My vision would be a button that is red when the service is stopped and green when its running and clicking it would toggle it. I'm just not sure how to have it get the state of the service. I know in cmd.exe I can get the state with this command: sc query service1 and in powershell I can get the state with this command: get-service service1

Is someone could point me in the right direction it would greatly help. I didn't see a predefined measure for querying the service, would it be something I would have to do in Lua?
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm
Contact:

Re: Query/Monitor Windows Services?

Post by SilverAzide »

This does not require LUA. You can use the RunCommand plugin (part of Rainmeter) to execute the commands (either powershell or cmd) and capture and parse the output to get the service state.
Post Reply