System Name from Driver

Which is why online DRM is the new standard. Short of hacking your central
database, or some heavy duty hacking, the physical separation ensures the
result.

But I didn’t read that from the OP’s post. I read that he has some device
that normally does not move from one host to another (like a disk array) and
wants to help the users avoid conflicts (like overlapping drive letters)
when it is

“Pavel A.” wrote in message news:xxxxx@ntdev…

Given the vague description of this device, it seems to be a “licensing”
dongle
which helps to detect “migration” of some software (with the dongle) to
other machines.
If so, generating the ID and storing it in the registry will work only until
the users find it and learn how to copy it :slight_smile:
– pa

“m” wrote in message news:xxxxx@ntdev…
> In UM, the API is GetComputerObjectName with NameUniqueId. I have no
> ideal if there is a KM equivalent as I have never had a requirement to
> look. I assume that you want to implement something like the ‘import
> foreign disk’ option. If that is correct, it is probably best to record
> the state of a particular device on the host rather than recording the
> ‘home’ host on the device. To do this, simply store something unique
> about the device in the registry, and have a second list of ‘accepted’
> devices. Your driver can disable the device if it is not on the second
> list, and the UM tool you use to ‘import’ the device can update it
> “Rajinikanth Pandurangan” wrote in message
> news:xxxxx@ntdev…
> Yes, this sounds better. Thanks Pete and All. By the way there are couple
> of reasons for us know whether a device is native/migrated.
>
> 1. We want to log this info about the Migrated device for customer to
> review. (As RAID controller does it today)
> 2. Currently our driver has some limitation so we just want handle Native
> devices for now. - Of course, this limitation can be removed but still
> knowing the difference is always good in our case.
>
> Once again, Many Thanks to all.
> -Raj P
>
>
> On Wed, Feb 13, 2013 at 6:29 AM, wrote:
>
> Each time my driver starts, I would look for a GUID in the Registry
> (perhaps under my device key).
>
> The first time my driver loads for the device, or even during
> installation, I would generate a GUID and store that GUID in the Registry.
> I would also store this GUID on the device.
>
> After the first time, if you find the GUID in the Registry, you simply
> compare that to the one stored in your device. If it matches… the
> device is on its “home” system. If it does not match, the device has been
> moved.
>
> Does that not meet your needs? It’s WAAAAY better than trying to use the
> system name, which is subject to change without notice,
>
> Peter
> OSR
>
>

.
And how is this name guaranteed to be unique? But the fundamental
question of “why” remains.

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ActiveComputerName

value name = ComputerName type REG_SZ

------ Original Message ------
From: “Rajinikanth Pandurangan”
> To: “Windows System Software Devs Interest List”
> Sent: 13/02/2013 12:44:35 p.m.
> Subject: Re: [ntdev] System Name from Driver
>>Here is my situation:
>>
>>Let’s say device D1 in system M1 and device D2 in system M2. My driver
>>on each system would store UuID of the system in its device.
>>If some moved D1 into M2, my driver should be able to identify it’s
>>native device, in this case it’s D2.
>>
>>Thanks,
>>-Raj P
>>
>>
>>
>>On Tue, Feb 12, 2013 at 10:13 AM, Don Burn wrote:
>>>I agree with Doron, in that that you should explain why you need this
>>>since the need is pretty rare. If you are going to do it, have you
>>>looked at ExUuidCreate, and RtlStringFromGUID?
>>>
>>>
>>>Don Burn
>>>Windows Filesystem and Driver Consulting
>>>Website: http://www.windrvr.com
>>>Blog: http://msmvps.com/blogs/WinDrvr
>>>
>>>
>>>
>>>
>>>“Doron Holan” wrote in message
>>>news:xxxxx@ntdev:
>>>
>>>>You are assuming one network / NIC that is global to the machine. A
>>>>machine can be multi homed on multiple network (types). Why do you
>>>>need a unique id?
>>>>
>>>>d
>>>>
>>>>From: xxxxx@lists.osr.com
>>>>[mailto:xxxxx@lists.osr.com] On Behalf Of Rajinikanth
>>>>Pandurangan
>>>>Sent: Tuesday, February 12, 2013 9:44 AM
>>>>To: Windows System Software Devs Interest List
>>>>Subject: Re: [ntdev] System Name from Driver
>>>>
>>>>
>>>>In my case, I do need some unique identifier of a windows system
>>>>which I thought computer name would be unique as long as in the same
>>>>domain.
>>>>
>>>>If you could provide bit more detail to get the system name (or any
>>>>other unique system identifier) would be helpful.
>>>>
>>>>thanks,
>>>>-Raj P.
>>>>
>>>>On Tue, Feb 12, 2013 at 8:58 AM, Mark Roddy
>>>>> wrote:
>>>>From a service, or from the registry where you put it. In general
>>>>drivers don’t need to know the system name.
>>>>
>>>>Mark Roddy
>>>>
>>>>On Tue, Feb 12, 2013 at 10:11 AM, Rajinikanth Pandurangan
>>>>> wrote:
>>>>Hello,
>>>>
>>>>What is the correct way to get the system name on a windows system
>>>>from a driver?
>>>>
>>>>Thanks,
>>>>-Raj P.
>>>>— NTDEV is sponsored by OSR OSR is HIRING!! See
>>>>http://www.osr.com/careers For our schedule of WDF, WDM, debugging
>>>>and other seminars visit: http://www.osr.com/seminars To unsubscribe,
>>>>visit the List Server section of OSR Online at
>>>>http://www.osronline.com/page.cfm?name=ListServer
>>>>
>>>>— NTDEV is sponsored by OSR OSR is HIRING!! See
>>>>http://www.osr.com/careers For our schedule of WDF, WDM, debugging
>>>>and other seminars visit: http://www.osr.com/seminars To unsubscribe,
>>>>visit the List Server section of OSR Online at
>>>>http://www.osronline.com/page.cfm?name=ListServer
>>>>
>>>>— NTDEV is sponsored by OSR OSR is HIRING!! See
>>>>http://www.osr.com/careers For our schedule of WDF, WDM, debugging
>>>>and other seminars visit: http://www.osr.com/seminars To unsubscribe,
>>>>visit the List Server section of OSR Online at
>>>>http://www.osronline.com/page.cfm?name=ListServer
>>>
>>>
>>>—
>>>NTDEV is sponsored by OSR
>>>
>>>OSR is HIRING!! See http://www.osr.com/careers
>>>
>>>For our schedule of WDF, WDM, debugging and other seminars visit:
>>>http://www.osr.com/seminars
>>>
>>>To unsubscribe, visit the List Server section of OSR Online at
>>>http://www.osronline.com/page.cfm?name=ListServer
>>
>>— NTDEV is sponsored by OSR OSR is HIRING!! See
>>http://www.osr.com/careers For our schedule of WDF, WDM, debugging and
>>other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
>>the List Server section of OSR Online at
>>http://www.osronline.com/page.cfm?name=ListServer
> —
> NTDEV is sponsored by OSR
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer