From: richard.townsendrose on
Hi guys

Geoff's function [which we use] uses the GetVolumeInformation fucntion
as opposed to Win32_PhysicalMedia Class function.

see http://msdn.microsoft.com/en-us/library/aa364993(VS.85).aspx

I do NOT want to change this, as when the hard disk is reformatted,
then the serial no is reset - and for our bigger users this means that
a project has been completed, and the it dept are running their
cleanup routines.

i put the check in of 11 chars because that would mean a very very
silly answer for a dword - max length is 10.

anyway, we have now started testing the two rogue machines - and i
susoect that they may both be running some ant-virus or other software
which is preventing the serial no being correctly provided....

richard
From: richard.townsendrose on
Hi guys

Geoff's function set the disk as follows
cDisk := DiskName() + ":\"

this was the cause of my problems... i have simply changed it to use
the drive from WorkDir() -> Substr(WorkDir(),1,1)+ ":\"

the "rogue" machines were always being driven by the same PERSON, and
he was using Windows Explorer the whole time to try and see what was
happening to the tdoc installation ... [i think !!!! he may be a
leprachaun !]

and that was setting the "windows active directory" ... the great text
at the start of geoff's function contains the word "ACTIVE" - that was
the clue ...

richard