Sign in to follow this  
floatingwoods

GetVolumeInformation returns the same serial on 14 different computers!

Recommended Posts

Hi, I implemented a light copy protection scheme using the GetVolumeInformation function (it seems retrieving the real hardware serial is difficult and requires low-level programming). It worked fine on all tested computers (about 20) until now: suddenly, 14 identical computers (installed in a school) ALL returned the same serial with that function. All computers have the exact same hardware configuration, but shouldn't the volume serial number be different? (the format date and time is supposed to be contained in the number). Here is the code I am using the retrieve that volume serial number:
DWORD CLicense::getVolumeInfo()
{
	DWORD retVal=0;
	char tmp[_MAX_FNAME];
	GetSystemDirectory(tmp,_MAX_FNAME-1);
	char drive[_MAX_DRIVE];
	char dir[_MAX_DIR];
	char name[_MAX_FNAME];
	char ext[_MAX_EXT];
	_splitpath(tmp,drive,dir,name,ext);
	std::string a(drive);
	a+="\\";
	GetVolumeInformation(a.c_str(),NULL,0,&retVal,NULL,NULL,NULL,0);
	return(retVal);
}

Another thought that crossed my mind: is it possible that the 14 computers are all using the same harddrive on the network? I am not really an expert in that ^^; Any alternative solution that would work for me? (I don't need perfect protection, but at least I wish to be able to distribute different serial numbers that correspond to different hardware numbers)

Share this post


Link to post
Share on other sites
It's likely that, instead of separately installing and configuring each computer, they simply set up one then cloned the hard drive (as in, made a bytewise identical copy -- including information on format date/time) for the rest of the computers.

If your software depends on an internet connection, you could use the MAC address of the LAN connection.

Share this post


Link to post
Share on other sites
Thank you MaulingMonkey.

Actually the software doesn't require any internet connection. Any way I could maybe just slightly change that number by combining it with an easy to extract hardware value of the hard drive? But I guess not.. is it really that difficult to get the harddrive serial number? I have read so many threads about that but never actually seen any code snippet, so it must!

Share this post


Link to post
Share on other sites
Just had an idea... would following be considered as a bad idea, and if not, how would I best implement that?

Knowing that GetVolumeInformation can return the same number for different computers (like MaulingMonkey suggested, through harddrive cloning) and that anyway you can modify it with some utility software, why not combine the GetVolumeInformation number with a random number that I would store in the registry and/or some windows folder (somewhere where chances for it being removed are low)? Then I could have following "pseudo"-hardware number:

VolumeSerial (8 BYTES) + myRandomNumber (2 BYTES)

Any thoughts on this?

Share this post


Link to post
Share on other sites
Quote:
Original post by floatingwoods
Just had an idea... would following be considered as a bad idea, and if not, how would I best implement that?

Knowing that GetVolumeInformation can return the same number for different computers (like MaulingMonkey suggested, through harddrive cloning) and that anyway you can modify it with some utility software, why not combine the GetVolumeInformation number with a random number that I would store in the registry and/or some windows folder (somewhere where chances for it being removed are low)? Then I could have following "pseudo"-hardware number:

VolumeSerial (8 BYTES) + myRandomNumber (2 BYTES)

Any thoughts on this?

If you're going to go that far, you may as well just generate a GUID which guarantees that you won't have a collision.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this