USB Storage device Label

Questions about Wine on Linux
Locked
Flabou
Level 1
Level 1
Posts: 7
Joined: Tue Jul 10, 2018 4:54 am

USB Storage device Label

Post by Flabou »

Hello,
I am trying to use a program which converts some files from a USB storage device. After experimenting with it, I have discovered it recognizes the device by its label (i.e. it only syncs if it sees a usb device with a particular name appear). Unfortunatelly, while wine does mount the USB key, it seems to be doing so without its name. If I plug my key in windows, open a cmd and type "vol F:"
I get something like :
The volume in F is labelled MyUSB
The serial number of the volume is F00F-94E9
(I translated so it's not the exact words in english)

When I do the same thing on linux after typing "wine cmd" and "vol F:" (and I know it's the correct letter because it's linked in .wine/dosdevices) I get :
Volume in drive f has no label.
Volume Serial Number is 0000-0000
The label is recognized by linux since it is automatically mounted in /media/username/MyUSB.
I tried setting the label in the drive tab of winecfg, but it doesn't seem to be working, and if I validate, close, an then reopen winecfg, it is back to empty value. I also tried adding string value in regedit in HKLM/SOFTWARE/WINE/DRIVE but it doesn't work either.

How can I make that label appear for wine, and how can I do so automatically upon connection of the device?
Thanks in advance for your help.
jkfloris
Level 12
Level 12
Posts: 3136
Joined: Thu Aug 14, 2014 10:10 am

Re: USB Storage device Label

Post by jkfloris »

Do you have write permissions on the USB device? When I try to label a device, the file .windows-label is created in the root directory.
Flabou
Level 1
Level 1
Posts: 7
Joined: Tue Jul 10, 2018 4:54 am

Re: USB Storage device Label

Post by Flabou »

I didn't know it created a file. It did create a .windows-serial which I hadn't noticed, but I don't think it created the .windows-label. However adding it manually and writing the name in it seems to work on a standard USB. I have to check tommorow but I don't think I have right access to the device, but in the worst case I copy the files to a folder where I do and mount it as a virtual device. Not very elegant but it should work.
Thank you for your help!
Locked