It is currently April 19th, 2024, 9:45 pm

Define UserAgent in Rainmeter.data

Get help with installing and using Rainmeter.
mistic100
Posts: 35
Joined: October 12th, 2014, 5:27 pm

Define UserAgent in Rainmeter.data

Post by mistic100 »

Hello

This page says about the UserAgent https://docs.rainmeter.net/manual/measures/webparser/
This option can also be set in the Rainmeter.data file. If set there, it will be used as the global setting for all WebParser measures unless overridden in an individual measure(s).
But it does not say how it should be defined. I simply tried to append it to the file

Code: Select all

[Rainmeter]
LastCheck=4.5.0
UserAgent=User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0
But it does not seems to work (as opposed to directly putting the option in my skin, which works).

Thanks
Last edited by mistic100 on August 30th, 2021, 6:18 pm, edited 1 time in total.
User avatar
Brian
Developer
Posts: 2679
Joined: November 24th, 2011, 1:42 am
Location: Utah

Re: Define UserAgent in Rainmeter.data

Post by Brian »

Good catch!

The proper settings for the "global" UserAgent and ProxyServer settings should be under a section named Webparser.dll in Rainmeter.data.

Rainmeter.data:

Code: Select all

[Rainmeter]
...

[WebParser.dll]
UserAgent=...
Please note, in future Rainmeter versions greater than 4.5.0, the ".dll" portion of the section name will be dropped for these settings, and it will just be [Webparser].

-Brian
mistic100
Posts: 35
Joined: October 12th, 2014, 5:27 pm

Re: Define UserAgent in Rainmeter.data

Post by mistic100 »

That was quickly updated, thank you.