News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

GLOBALLY UNIQUE properties

Started by ossama, December 12, 2007, 06:38:55 AM

Previous topic - Next topic

ossama

hello,
i am writting a program that is will work only in my PC , so if i run that program from my pc it will work,but it will not work on any other machine,so i thinked of properties (of the pc) that are globaly unique like CPU ID, motherboard ID , chipset id ,....
is it possible to do this ? or if you have better idea please tell me.
thank you.

Adamanteus

 No betters ideas - only Data sheet (on cpuid for example)

ossama

is CPUID unique for every machine in the world?

Adamanteus


Vortex

Ossama,

I guess you are looking for something like Windows Product Activation collecting information from your computer's components.

As a first trial, how about getting the volume serial number(s) of your hard disc?  I guess it's not the best idea to solve your problem but it worths to do a trial as an exercise.

RuiLoureiro

Quote from: Vortex on December 12, 2007, 07:13:59 PM
I guess you are looking for something like Windows Product Activation collecting information from your computer's components.
Vortex,
              I am trying to understand your question, but everyone that wants to know CPUID, motherboard ID wants to know WPA ? I dont think so. Because who knows CPUID etc. is near to know my WPA. Is it right ?

RuiLoureiro

Vortex

Quote from: RuiLoureiro on December 12, 2007, 07:35:05 PM
Quote from: Vortex on December 12, 2007, 07:13:59 PM
I guess you are looking for something like Windows Product Activation collecting information from your computer's components.
Because who knows CPUID etc. is near to know my WPA. Is it right ?

RuiLoureiro

I am afraid this not a simple task. Have a look at this article :

http://en.wikipedia.org/wiki/Windows_Product_Activation

RuiLoureiro

Ok, i saw it. I have no problems with anything. I bought all things i have. But i remember i tested in my computer an exemple (from Michael if i am right ) to get CPUID and i dont know what more and i had no problems. I didnt think it was to make bad things in my computer. Do you think if i want to know CPUID is it because ... ??? I think it cannot be generallized.
Its all.

Have i nice night/day
RuiLoureiro

ossama

QuoteWindows Product Activation checks eight different categories of hardware:

Display Adapter
SCSI Adapter
IDE Adapter
Network Adapter (including the MAC Address)
RAM Amount Range (e.g. 0-512 MB)
Processor Type and Serial Number
Hard Drive Device and Volume Serial Number
Optical Drive (e.g. CD-ROM)

but how can i get some property (serial number for example) from these objects (for example, how can i get the serial number of the hard disk within masm)

donkey

There are few things that will work here, each motherboard may have a different method of extracting the serial number so that would be a lot of work. CPUID has nothing unique to extract. I would look at the following key...

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ProductID

It should be unique to your PC.

Donkey
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

ossama

hi donkey,
what is this key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ProductID
ProductID of what?

Adamanteus

#11
I'm thinking he mistaken a little bit, mean the key :
HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System

Tedd

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ProductID
contains the registration number for your windows installation (you can see it under "Registered to:" in the System Properties dialog.)
It should be unique for each windows cd (i.e. if you use the same cd on two machines, they will have the same id.)

HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System
has information about the bios/pci/cpu, which can be useful, but many machines will have similar sets of components, especially if they came from the same vendor.


Maybe take all of them together as one long string, then hash that to obtain an identifier.
No snowflake in an avalanche feels responsible.

ossama

so we cant obtain globaly unique property from ProductID and system.

ossama

QuoteMaybe take all of them together as one long string, then hash that to obtain an identifier.
Tedd, how can i make the 'hash'?