Rainmeter never needs "quotes" around option values
The first thing to be aware of is that Rainmeter doesn't pay the slightest bit of attention to starting and ending "quotes" around option values. By that I mean things like:
Interface="Qualcomm Atheros AR938x Wireless Network Adapter"
Doesn't matter a bit if there is "white space" (spaces or tabs) in the value, those beginning and ending "quotes" are just not needed. In fact, the very first thing Rainmeter will do is strip them off and throw them away. They are just ignored. The above can and should be defined as:
Interface=Qualcomm Atheros AR938x Wireless Network Adapter
Why is this? It's because an option value is always a single thing. It is always a single string value to Rainmeter, and the "quotes" are not needed because they are assumed by the program. In other words, Rainmeter knows the values are strings, and you don't have to tell it so like you would in a programming language where you might say
myVar="Hello World". In that case, you have to tell the language that the variable myVar is a string. In Rainmeter, you never do. They are all strings, even
W=100. Rainmeter knows when an option requires a number, and will itself turn the string "12" into the number 12 as needed. You don't have to worry about it.
So not to get too far into the weeds, just keep this simple rule in mind. Rainmeter never, ever needs starting and ending quotes around option values.
What about [Variable] values?
There is no difference. The things defined in [Variables] are just
Option=Valuelike anything on a measure or meter. Never use starting and ending quotes on variable definitions. They are just stripped off and thrown away.
Won't white space in values like paths to a file cause problems?
NO. Rainmeter is perfectly fine with
ImageName=#@#Images\My Image.png. By the definition of the option, it knows that a path to a file is expected, and it will deal with it properly when it asks Windows for the file behind the scenes. Starting and ending "quotes" are just not needed. Again, they are just thrown away.
So when do I actually need "quotes" around a string in Rainmeter?
The only time you will in fact need "quotes" around a string in Rainmeter is when the string value is a parameter to a bang, and the string value contains white space (spaces or tabs).
LeftMouseUpAction=[!SetOption MyMeter ImageName #@#Images\My Image.png]
LeftMouseUpAction=[!SetOption MyMeter ImageName "#@#Images\My Image.png"]
So what is the difference? It's the fact that there are multiple "parameters" supported in bangs, and white space will confuse Rainmeter about where a parameter starts and ends. In that example above, the !SetOption bang, as most do, supports a final optional parameter of "config name", which tells it which skin / config you want the bang to operate on. With the white space in the path above, Rainmeter can't know if
Image.pngis still part of the path, or the name of the config to act upon. The "quotes" around the value resolves this ambiguity.
When the !SetOption bang actually sets the value for the option ImageName on the meter, it will be set without the quotes. Again, they are just not needed on option values. The quotes are there to help Rainmeter "parse" the bang parameters. Nothing else.
So the rule here is that you should always enclose string parameters in bangs in "quotes". Even if there is no white space in the value, it's a good habit to get in. This habit will be particularly useful, and will save a lot of head-scratching, when you dynamically use [SectionVariables] or #Variables# in the parameters in a bang. Are you SURE there aren't, or won't ever be, spaces in that value?
That's it really. Just keep these two rules in mind:
1) Rainmeter never needs starting and ending "quotes" around option values
2) Always enclose string parameters in bangs in "quotes"