It is currently September 29th, 2024, 1:21 pm

Does this work only with windows "default" applications?

General topics related to Rainmeter.
someone01
Posts: 33
Joined: June 11th, 2014, 11:43 pm

Does this work only with windows "default" applications?

Post by someone01 »

I was reading this part of the manual and found something interesting

The tutorial/tricks section say the following:
[MeterLaunch1]
Meter=String
X=5
Y=5
FontFace=Trebuchet MS
FontSize=14
FontColor=255,255,255,255
StringStyle=Bold
AntiAlias=1
Text=Notepad
SolidColor=0,0,0,1
LeftMouseUpAction=["C:\Windows\System32\Notepad.exe"]
Nothing wrong or out of the ordinary.

But then it gives another example:
[MeterLaunch2]
Meter=String
X=0r
Y=2R
FontFace=Trebuchet MS
FontSize=14
FontColor=255,255,255,255
StringStyle=Bold
SolidColor=0,0,0,1
AntiAlias=1
Text=Paint
LeftMouseUpAction=["MSPaint.exe"]
Eh...does the rainmeter in the second example searches in all the PC for "MSPaint.exe"?

I didn't knew this was possible.

I was wondering if it worked for any application, or if only for windows ones.

Most of the rainmeter code i use is extremely outdated (or thats what i read), so im not sure if its a feature of rainmeter or not.

If it is only for windows default applications, i guess there is no way to just write LeftMouseUpAction=["application_name_here.exe"] and simply make rainmeter to search it and then open it?
User avatar
jsmorley
Developer
Posts: 22790
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Does this work only with windows "default" applications?

Post by jsmorley »

No, it won't search your drive for applications. Things like MSPaint.exe and Notepad.exe don't require a full path to them as they come with Windows and are in folders defined by the Windows %PATH% environment variable, like C:\Wiindows\System32. Folders defined in that variable are always searched when you run an application without specifying the location.

In reality, this is behavior that is left over from the old DOS days, when you were at a command prompt and manually typing commands or running batch files. It was certainly easier to type "format" than it was to type "C:\dos\format", so C:\DOS was included in the %PATH% and system commands like format.com could be run without specifying the path. In today's world, you generally run things from shortcuts, and the path is part of the properties of the shortcut, so the %PATH% environment variable is increasingly not that important or useful. I suspect most people who use computers don't know it exists.

Generally speaking, if you are executing system applications that "come with Windows", like calc.exe or notepad.exe, or were carried over from DOS, like our old friend format.exe, (the artist formerly known as format.com) then you won't need to specify the path. Everything you install you usually will, unless the application adds itself to the %PATH% when installed, which is increasingly rare except for some things that are still highly command line operated, like some programming language compilers and such.