It is currently March 29th, 2024, 5:51 am

[Solved] Drive Label not showing (SD Card)

Get help with creating, editing & fixing problems with skins
pixlplague
Posts: 4
Joined: August 11th, 2021, 11:59 am

[Solved] Drive Label not showing (SD Card)

Post by pixlplague »

Hello everyone,

First post here, but I've been lurking for a very long time! I just never really had anything to contribute ;)

I have a seemingly simple issue, but I can't find any reference to it anywhere: when using FreeDiskSpace on one of my SD Card, the label always comes up empty. It is a Bitlocker protected SD Card, so I first thought Bitlocker was the issue but after doing some swapping it seems any SD Card has the same issue, so I'm stumped.

Code: Select all

[mDiskLabel]
	Measure=FreeDiskSpace
	Drive=F:
	UpdateDivider=20
	Label=1	
	IgnoreRemovable=0
	
	[MeterText]
	Meter=String
	MeasureName=mDiskLabel
	Text=%1
All other measures work fine, I get all the correct free disk space. I've tried many combinations but I always get a blank label... Is this a known limitation? Anyone have any experience with it?

Thanks!
Last edited by pixlplague on August 31st, 2021, 2:02 pm, edited 1 time in total.
User avatar
CyberTheWorm
Posts: 860
Joined: August 22nd, 2016, 11:32 pm
Location: Surrey, B.C., Canada

Re: Drive Label not showing (SD Card)

Post by CyberTheWorm »

Try this it works for me

Code: Select all

[MeasureDiskLabel]
Measure=FreeDiskSpace
Drive=F:
Label=1
IgnoreRemovable=0

[MeterText]
Meter=String
MeasureName=MeasureDiskLabel
Text=%1
The only source of knowledge is experience. Albert Einstein
Deviant Art Page
User avatar
CodeCode
Posts: 1363
Joined: September 7th, 2020, 2:24 pm
Location: QLD, Australia

Re: Drive Label not showing (SD Card)

Post by CodeCode »

CyberTheWorm wrote: August 11th, 2021, 3:17 pm Try this it works for me

Code: Select all

[MeasureDiskLabel]
Measure=FreeDiskSpace
Drive=F:
Label=1
IgnoreRemovable=0

[MeterText]
Meter=String
MeasureName=MeasureDiskLabel
Text=%1
Hmm. I thought about that UpdateDivider=20. It may be timing out so if you really need to be sure that the drive isn't being spammed for info, try it with none or UpdateDivider=1. If that works, you can experiment by increasing the value, keeping in mind the original 20 might have been to high.
ƈǟռ'ȶ ʄɨӼ ɨȶ ɨʄ ɨȶ ǟɨռ'ȶ ɮʀօӄɛ - ʊռʟɛֆֆ ɨȶ ɨֆ ɨռ ƈօɖɛ.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Drive Label not showing (SD Card)

Post by balala »

pixlplague wrote: August 11th, 2021, 12:09 pm when using FreeDiskSpace on one of my SD Card, the label always comes up empty. It is a Bitlocker protected SD Card, so I first thought Bitlocker was the issue but after doing some swapping it seems any SD Card has the same issue, so I'm stumped.
Could you please post the whole code of the skin? The above [mDiskLabel] measure does work for me (even if not with a SD Card), so would be curious about the code of the whole skin.
pixlplague
Posts: 4
Joined: August 11th, 2021, 11:59 am

Re: Drive Label not showing (SD Card)

Post by pixlplague »

Sorry for the late reply folks, been busy. Appreciate the help but I'm still stuck.
CyberTheWorm wrote: August 11th, 2021, 3:17 pm Try this it works for me

Code: Select all

[MeasureDiskLabel]
Measure=FreeDiskSpace
Drive=F:
Label=1
IgnoreRemovable=0

[MeterText]
Meter=String
MeasureName=MeasureDiskLabel
Text=%1
I tried and same result, or rather, lack thereof... But thanks for the lead!
CodeCode wrote: August 11th, 2021, 4:18 pm Hmm. I thought about that UpdateDivider=20. It may be timing out so if you really need to be sure that the drive isn't being spammed for info, try it with none or UpdateDivider=1. If that works, you can experiment by increasing the value, keeping in mind the original 20 might have been to high.
Tried that as well, same results with any value, or removing it completely...
balala wrote: August 11th, 2021, 6:24 pm Could you please post the whole code of the skin? The above [mDiskLabel] measure does work for me (even if not with a SD Card), so would be curious about the code of the whole skin.
Here you go. That said, this is actually a debugging skin I created when I noticed my other skins having this issue (hence the strange naming convention, it's a lot of copy&paste). So this is the simplest iteration I have, but ALL my others skins have the same bug, including some I've downloaded from other people to test out. Works with every other drive, internal or external, except the SD card reader... Very strange...

Code: Select all

	[Rainmeter]
	Update=1000

	[mFreeDiskSpace]
	Measure=FreeDiskSpace
	Drive=F:
	UpdateDivider=1
	IgnoreRemovable=0

	[mDiskLabel]
	Measure=FreeDiskSpace
	Drive=F:
	UpdateDivider=1
	Label=1	
	IgnoreRemovable=0

	[Image]
	Meter=Image
	W=400
	H=100
	SolidColor=255,255,255
	PreserveAspectRatio=2

	[Text]
	Meter=String
	MeasureName=mDiskLabel
	MeasureName2=mFreeDiskSpace
	Text="%2% available on %1"
	AutoScale=1
	Percentual=1
	X=70
	Y=50
	StringAlign=CenterCenter
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Drive Label not showing (SD Card)

Post by jsmorley »

I wonder if FreeDiskSpace is able to deal with SD card reader as a "disk". Might not...

I'd be interested to see what Powershell sees the drive as...

Get-CimInstance -ClassName Win32_LogicalDisk


1.jpg


That drive F: in my system is a virtual CD/DVD drive, which is currently "empty", so it doesn't see much about it. Windows sees it as Type 5, which is defined as a RAM drive.
You do not have the required permissions to view the files attached to this post.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: Drive Label not showing (SD Card)

Post by SilverAzide »

In case anyone wants confirmation, Rainmeter is working perfectly fine with an SD Card (drive E):
Image1.jpg
Image2.jpg
One question for the OP, did you actually give the drive a volume label? Sorry for the dumb question, but if you leave the label blank, File Explorer will helpfully show a label of "SD Card", but that label doesn't actually exist.
You do not have the required permissions to view the files attached to this post.
Gadgets Wiki GitHub More Gadgets...
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Drive Label not showing (SD Card)

Post by balala »

jsmorley wrote: August 14th, 2021, 4:11 pm I wonder if FreeDiskSpace is able to deal with SD card reader as a "disk". Might not...
It seems it doesn't. I tried three skins returning the label of my SD card. None did. The space is returned properly, the label is not.
Note that neither the Disks Meter skin of ModernGadgets doesn't return the label of the SD card.
SilverAzide wrote: August 14th, 2021, 4:59 pm In case anyone wants confirmation, Rainmeter is working perfectly fine with an SD Card (drive E):
Are you sure? See the above replies.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: Drive Label not showing (SD Card)

Post by SilverAzide »

balala wrote: August 14th, 2021, 7:13 pm Are you sure? See the above replies.
I am extremely sure. Did you not see my screenshot? Perhaps there is some difference with the SD card reader itself? Mine is acting like a USB device. I tried both a USB reader and the one built into my laptop. All work perfectly with Rainmeter.

Edit: Just a thought here, but disks formatted with FAT32 (like some SD cards) don't handle Unicode labels (supposedly). In fact, the one I'm using doesn't even support lowercase letters! Any chance your SD card has a Unicode label? It might help to see the output of the Powershell command jsmorley posted above, or this variant:

Code: Select all

Get-CimInstance -ClassName Win32_LogicalDisk | Select-Object DeviceID, DriveType, FileSystem, MediaType, ProviderName, VolumeName, Size, FreeSpace | Format-Table -AutoSize
Gadgets Wiki GitHub More Gadgets...
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Drive Label not showing (SD Card)

Post by balala »

SilverAzide wrote: August 14th, 2021, 9:56 pm Perhaps there is some difference with the SD card reader itself? Mine is acting like a USB device. I tried both a USB reader and the one built into my laptop. All work perfectly with Rainmeter.
Maybe. Mine is an internal card reader on my laptop, but don't return the label of the card.