It is currently March 29th, 2024, 12:00 pm

Get name of your display adapter / graphics card

Share and get help with Plugins and Addons
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Get name of your display adapter / graphics card

Post by jsmorley »

But it might also be in the !Execute(s) that enables/disables the measures and calls the addon.

In fact, I'll bet 50 cents that:

!Execute [!RainmeterDisableMeasure MeasureGetAdapter "#CURRENTCONFIG#"]

instead of:

!Execute [!RainmeterDisableMeasure MeasureGetAdapter #CURRENTCONFIG#]

fixes it.
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: Get name of your display adapter / graphics card

Post by Seahorse »

Test skin WAS in a folder called "Test Skins" with a file name of "Get Graphics Cards.ini".

Renaming folder to "TestSkins" and the skin to "GetGraphicsCards.ini" worked first time.

Don't see how to cover this situation with: URL=file://#CURRENTPATH#DisplayAdapter.txt which I assume it the part that doesn't like spaces.

!Execute [!RainmeterDisableMeasure MeasureGetAdapter "#CURRENTCONFIG#"]

Doesn't work with both with spaces. I'll test the folder & the skin names in a minute and see if it covers one of them. End result is - It's the Folder name, NOT the .ini file name that breaks this.

We have a work around I guess, and the new skin folder will be renamed before release, but the gap and the number were there to make my life easier when switching and comparing between the two. That worked out well... O.O
Last edited by Seahorse on July 16th, 2011, 8:11 pm, edited 1 time in total.
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Get name of your display adapter / graphics card

Post by jsmorley »

Seahorse wrote:Test skin WAS in a folder called "Test Skins" with a file name of "Get Graphics Cards.ini".

Renaming folder to "TestSkins" and the skin to "GetGraphicsCards.ini" worked first time.

Don't see how to cover this situation with: URL=file://#CURRENTPATH#DisplayAdapter.txt which I assume it the part that doesn't like spaces.

!Execute [!RainmeterDisableMeasure MeasureGetAdapter "#CURRENTCONFIG#"]

Doesn't work with both with spaces. I'll test the folder & the skin names in a minute and see if it covers one of them.

We have a work around I guess, and the new skin folder will be renamed before release, but the gap and the number were there to make my life easier when switching and comparing between the two. That worked out well... O.O
Spaces in "config" names (ie folders) I have never had any problem with as long as I use quotes around the path, variable or not. Spaces in the names of .ini files I really don't recommend. I can't remember specifics, but I know I have run into problems with that in the past. You can use underlines if you want to make the file names more readable.
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: Get name of your display adapter / graphics card

Post by Seahorse »

Edited while you were replying:

Doesn't work with both with spaces. End result is - It's the Folder name, NOT the .ini file name that breaks this.

I will revisit the config names that have spaces, though there are a bunch of them, I like them to be easy to read... :D
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Get name of your display adapter / graphics card

Post by jsmorley »

Well I recreated your situation, and my suggestion of putting #CURRENTCONFIG# in quotes in all the places you are using it worked just fine for me. The URL seems to be perfectly happy with spaces in the #CURRENTPATH# without quotes. I put spaces in both the folder name (config) and the .in file, and as long as I enclose #CURRENTCONFIG# in quotes everything works fine.

I see no reason to limit yourself to folder names with no spaces. Lots of folks use them with no issue. You just have to use quotes so Rainmeter doesn't see \My Folder\ as two things instead of one.
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: Get name of your display adapter / graphics card

Post by Seahorse »

Will do, thanks for the help. Might be worth updating the OP with the speech-marks version.. ;)
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Get name of your display adapter / graphics card

Post by jsmorley »

Seahorse wrote:Will do, thanks for the help. Might be worth updating the OP with the speech-marks version.. ;)
Yeah, you are probably right. I should have from the beginning. I am a firm believer in using quotes when there is even a possibility that a path variable is going to contain spaces.

Edit: Done...
Ariex
Posts: 14
Joined: December 23rd, 2010, 1:33 pm
Location: Germany

Re: Get name of your display adapter / graphics card

Post by Ariex »

It is extremely complicated bordering on impossible to get the name of your graphics card / display adapter from the Windows registry.
This does not work for you?

[MeasureGraphicsCard]
Measure=Registry
RegHKey=HKEY_LOCAL_MACHINE
RegKey=SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winsat
RegValue=PrimaryAdapterString

I have an Nvidia 260 GTX and this works perfect for me.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Get name of your display adapter / graphics card

Post by jsmorley »

Ariex wrote: This does not work for you?

[MeasureGraphicsCard]
Measure=Registry
RegHKey=HKEY_LOCAL_MACHINE
RegKey=SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winsat
RegValue=PrimaryAdapterString

I have an Nvidia 260 GTX and this works perfect for me.
It does for me as well on Win7, but my understanding is that it is not reliable / available on all OS versions and configurations. It certainly would not work on XP, as WinSat (System Assessment Tool) did not exist. It also can be out of date, as it is only set when you run WinSat. A lot of folks turn off the automatic run of WinSat at 1am via the scheduling tool and only do it manually when they want to.

As always, there are a bunch of ways to skin a cat, particularly if you are making a skin just for your own needs. Everything I have read however recommends using the API call that gets the "driver" from the registry, then queries the driver to have it actually go get the name from the card itself.