View Single Post
  #6  
Old November 13th 03, 10:54 PM
mcheu
external usenet poster
 
Posts: n/a
Default

On Thu, 13 Nov 2003 13:38:13 +0100, "Michael Wittmann"
wrote::

Hi folks,

I have to write a Visual Basic 6.0 Program and need to uniquely identify a
computer in a network and the user mustn't be able to change that id while my
program is running. So the Volume Serial Number of the HDD isn't a possibility,
because you can set the Volume SN whatever you want and therefore it's not
unique in a Network. I heard that there's a manufacturer's Serial Number on the
HDD that can't be changed and that is unique (worldwide?). How can I get that SN
with VB6? Or do you have any other ideas? Like a BIOS SN?

Thanks a lot in advance,

Michael
PS: Answer in German is ok.


What about a software solution? As you're using VB, I guess it's for
windows systems. Under normal operating conditions, windows will lock
out file write access to all other apps if it's currently in use.
While not efficient, and not terribly secure, it will hamper
modification attempts so long as the program's running. Just code
your app to open a filestream to the serial number file, and keep it
open until the app closes. Just be sure to have clean up code in
place, as leaving it up to the OS can cause problems -- especially
when we're talking VB, which is flakey already.

As for uniqueness, that would be up to you to generate a unique serial
number for each installation.

If you want a hardware solution, there's the suggested MAC address
which was previously mentioned, or if you know how to do it, you could
have the program refuse to run unless the CPU ID feature is enabled.
Of course, your users would probably have issue with that.
----------------------------------------
Thanks,
MCheu