Usb thumbdrive hardware Id

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
kartal
Level 2
Level 2
Posts: 15
Joined: Wed Nov 25, 2009 12:31 pm

Usb thumbdrive hardware Id

Post by kartal »

Hi
Is there a way to attach Usb thumbdrive serial number to mounted drive? I see that there is something in the Winecfg. but it does not seem to either save the serial when I put it. Maybe it is unfuncional. The reason I am looking for a solution for this is that I have Windows app that checks the usb drives real serial number.

thanks
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Usb thumbdrive hardware Id

Post by vitamin »

kartal wrote:Is there a way to attach Usb thumbdrive serial number to mounted drive? I see that there is something in the Winecfg.
Make sure it's mapped as a separate drive in winecfg.

If Wine still doesn't pickup the serial # the create a file ".windows-serial" in the root of the drive. And put whatever serial number you want into it.
kartal
Level 2
Level 2
Posts: 15
Joined: Wed Nov 25, 2009 12:31 pm

Post by kartal »

Hi Vitamin

Thank you for the follow up. I did the trick but cannot get it to work. Which method of mapping-mounting shall I use?
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

kartal wrote:Which method of mapping-mounting shall I use?
Mount USB drive. Then run Winecfg -> drives tab, Add..., select drive, select new drive, change path to where your USB stick is mounted to.
kartal
Level 2
Level 2
Posts: 15
Joined: Wed Nov 25, 2009 12:31 pm

Post by kartal »

vitamin,

That is what I was doing on the Wine end, but it was not working. Sorry I did not articulate my question better. I was wondering the mounting on the linux side. Which method shall I use to mount my usb flashdrive as a unix device?

thanks
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

kartal wrote:Which method shall I use to mount my usb flashdrive as a unix device?
Doesn't matter, they all have same end result (more-less).

So what is your program looking for? And how is it looking for it? If it just looks for s/n of a drive it's one thing. If it trying to find something about the device via ioctls/registry - it won't work on Wine.
kartal
Level 2
Level 2
Posts: 15
Joined: Wed Nov 25, 2009 12:31 pm

Post by kartal »

vitamin wrote:
kartal wrote:Which method shall I use to mount my usb flashdrive as a unix device?
Doesn't matter, they all have same end result (more-less).

So what is your program looking for? And how is it looking for it? If it just looks for s/n of a drive it's one thing. If it trying to find something about the device via ioctls/registry - it won't work on Wine.
Hmm maybe the app is using more rigorous methods to determine the device serial. I cannot event it to recognize the drive as a valid drive.

Do you know if in the future there will be more native support of these hardware serial issues?

thanks
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

kartal wrote:It cannot event it to recognize the drive as a valid drive.
Then it most likely wants to see it as a device. And since Wine doesn't talk directly to HW, your program won't find the stick.
kartal wrote:Do you know if in the future there will be more native support of these hardware serial issues?
In some point in the future Wine would be able to talk to USB devices directly. However not sure how much it will help in this case.
kartal
Level 2
Level 2
Posts: 15
Joined: Wed Nov 25, 2009 12:31 pm

Post by kartal »

vitamin, thanks for your help. It seems like there is not much that can be done at the moment.
Frank236
Newbie
Newbie
Posts: 1
Joined: Wed Nov 07, 2012 9:44 am

Re: Usb thumbdrive hardware Id

Post by Frank236 »

The subject is already old but I struggled with the same problem, voyager on a usb stick, activation depends on usb id. Did not find an answer elsewhere so after some fiddling:

Even if usb is formatted in FAT32, wine shows it internally as NTFS, so start with a NTFS formatted usbstick.
Windows, go to terminal (cmd) change to volume where your usb is mounted, in this case I:, and type dir
You will see:

I:\>dir
Name of volume in station I is EMAIL8GB
Number is 58BA-7DB8

Create file .windows-serial in root usb with sole entry the volume number without the hyphen: 58BA7DB8

create file .windows-label in root usb with sole entry volume name, in this example EMAIL8GB

Activate on windows, and voyager will retain volume number when started through wine under linux and will not request a second activation any more.

Tested with wine 1.5.16 ubuntu 12.04 voyager 5.1.6.5
Locked