Page 1 of 1

How to generate a unique machine ID Crossplatform

Posted: Mon Sep 28, 2009 10:31 am
by titobal
Hi,

I wonder if it is possible to generate a unique ID
per machine at runtime of a Runtime Revolution application.

I would like to generate a unique ID for Windows and Mac
machines with the same routines if possible.

Is this possible ?

How would you do that ?

Any help is welcomed.

Posted: Mon Sep 28, 2009 3:39 pm
by Klaus
Hi titobal,

on a Mac (OS X) you can use shell:
...
put shell("uuidgen") into tUUID
...
I am sure there is a tittle VBScript that you can use, but I have no idea :-)


Best

Klaus

Posted: Mon Sep 28, 2009 6:00 pm
by mwieder
Do you need this each time the application is *run* or just the first time? What is it you're trying to accomplish? If you're just trying to get a unique identifier for the hardware would the MAC address from the network card do the trick?

Posted: Mon Sep 28, 2009 8:57 pm
by SparkOut
Klaus wrote: I am sure there is a tittle VBScript that you can use, but I have no idea :-)
:-)
on Windows:

do the uVBScript of <theObject> as "vbscript"
put the result

where the uVBScript is:

Set TypeLib = CreateObject("Scriptlet.TypeLib")
result = TypeLib.Guid

---
That's assuming you want to generate a (new) UUID/GUID (in this case type 4) at any time. If you want to get a unique ID that ties in to the particular machine hardware that you're running the app on, then something like interrogating the disk volume id string in Windows WMI might be more like what you need - can we have some more information as to what you need to achieve?

I would like to get the same ID each time I run the app...

Posted: Mon Sep 28, 2009 9:05 pm
by titobal
Sorry if my initial request was not clear.

I need to do that :

1. Run the software on Computer 1

2. Get a unique ID based on Computer 1 characteristics
(mac address / ram / os version or other parameter which
do not change a lot during the computer's life...)

3. Based on the ID + Final User infos I would issue a key / serial number / registration number

How would you do that ?

I plan to use Zygodact but I would like to add the Computer ID on top of Zygodact...

Hope I'm clear now.

Thanks anyway for the GUID tips on mac & PC :-)

Posted: Mon Sep 28, 2009 10:48 pm
by Mark Smith
Ken Ray has a great cross-platform handler for getting the MAC address here:

http://www.sonsothunder.com/devres/revo ... env001.htm

For UUIDs, I'll plug my own pure revolution stack (that uses Ken Ray's handler) for generating type 1,3 and 4 UUIDs, here:

http://futsoft.futilism.com/revolutionstuff.html

Best,

Mark Smith

Posted: Mon Sep 28, 2009 11:10 pm
by mwieder
titobal-

Follow up on Mark Smith's links there and I think you'll get what you want, but...

if I understand what you're doing then personally I wouldn't do that. You're tying your license to a particular set of hardware and software and creating support headaches for yourself in the process. What happens when the user upgrades some equipment? What if their computer dies and they have to replace it? You'll have to generate new license codes in that case.