unknown
3/8/2012 4:49:00 AM
"Tony Toews" <ttoews@telusplanet.net> wrote in message
news:l2dgl71iemrmkee9nd0v2sun8s6r1iup5h@4ax.com...
> On Wed, 7 Mar 2012 23:17:45 -0500, "Farnsworth" <nospam@nospam.com>
> wrote:
>
>>> I have to ensure that I can uniquely identify a particular PC so I can
>>> fetch/update some information from a database.
>>>
>>> Domain/workgroup and machine name clearly aren't specific enough.
>>
>>Why not? You can use GetComputerNameEx() to get a name like
>>myserver1.company.com.
>
> But what if it's a home PC not joined to a domain? Also can't
> Windows server domains be independent of the company domain? That is
> they don't have to be part of the external domain system. Or maybe I
> don't know enough to ask the right questions.
If these PC's are hooked up to the same LAN, then they need to be unique
somehow, but if you need a solution that identify computers from multiple
networks, then you need a different solution.
>>> The SID can be duplicated. As can the Windows license key, I think,
>>> due to large corp/educational institions volume licensing.
>>>
>>> MAC address? How do I know which are real physical devices, the
>>> RJ45 and wireless ports vs various virtual ports of which I have many
>>> on my system what with VMWare and such.
>>
>>Would identifying the user enough, or it must be the PC? In my case, I
>>only
>>wanted a way to identify the user, and the way I did it is by storing a
>>GUID(as a form of random number) in a location in HKCU and send it to the
>>server to lookup the user's settings. HKCU is always writable, so I didn't
>>have problems with permissions.
>
> Hmm, now that's a good idea I hadn't thought of. Thanks muchly. In
> this case if the user reformats the OS or moves to a new PC that's
> fine. I just care to ensure the PC is somehow unique to the
> database. And if it's multiple users on the PC that's fine too.
>
> Actually that's an excellent idea! I gotta think about that a bit
> but yes that could very much work.
The problem with this is that HKCU and the user's profile could roam.
Meaning that the user could log into one PC(which downloads the user's
profile from a server) then logs out(which uploads the changed user's
profile to the server), then logs into another PC, so if you do this, the
settings would be tied to user and not the PC. If roaming is disabled, then
you are basically identifying the user on a specific PC. If he logs into
another computer, he is a different user as far as you are concerned.