Note: As of the Rainmeter 3.3 r2493 beta of December 27, 2015, RunCommand is included in the Rainmeter distribution, and there is no need to download, install, or include RunCommand within an .rmskin. RunCommand just comes with Rainmeter.
This is a simple little plugin to run a program with an initial state (ie. Hidden, Minimized, Maximized) and to also retrieve the output (or stdout) of the program (especially command-line programs).
- Program - The program to run. The default value is the
%ComSpec%environment variable (ie. cmd.exe) with the parameters "\U" for Unicode pipe output and "\C" to close the program when finished.
- Parameter - Command-line parameters (if any). If no "Program" is given, this option represents the "command" you would run from the command-line.
- State - Initial "state" of the program. Options include:
Maximized. Some programs (like Calc.exe) explicitly show themselves no matter what the OS initially tells them they should be, so not all programs will respond to this option.
- FinishAction - Action to run after the program has exited.
- OutputFile - File where the output is saved. The file's encoding will correlate to the
OutputTypeoption. Use this if you want the output saved to a file.
- OutputType - Type of output to be expected. Options include:
- StartInFolder - Starts the program in this folder.
- Timeout - In milliseconds. The program is will close after this interval.
-1is the default value.
- Run - Runs the program. Example:
!CommandMeasure MeasureName Run
- Close - Attempts to close the program. The program may prompt the user to close. Example:
!CommandMeasure MeasureName Close
- Kill - Terminates the program without notice. Recommended for programs started in the hidden state
!CommandMeasure MeasureName Kill
Note: Because Rainmeter strips any quotes from the start and end of an option (if both exist), it is important to double quote the
Parameteroptions if needed (ie.
Program=""C:\Program Files\Some Program\Something with a space.exe"")
For examples, changes and additions, check the official Rainmeter documention here: https://docs.rainmeter.net/manual-beta/plugins/runcommand/