Author Topic: serial_no....  (Read 2367 times)

0 Members and 1 Guest are viewing this topic.

Andrea

  • Water Moccasin
  • Posts: 2372
serial_no....
« on: August 10, 2005, 04:35:15 PM »
Hi,

I use (dos_serialno "d:") in a program to detect
if the serial is in some list..

this function come with Doslib 6.1

But to use that, I need to load the Doslib.ARX file.

so the question is.....is there any function doing the same thing without loading any ARX file ?

thanks.
Keep smile...

Bob Wahr

  • Guest
serial_no....
« Reply #1 on: August 10, 2005, 04:44:44 PM »
You can do it without loading autocad.  It's in the registry and can be gotten from there.  Where will depend on version but the key will be something like HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\AutoCAD\R16.2\ACAD-4001:409

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
serial_no....
« Reply #2 on: August 10, 2005, 04:50:36 PM »
This can be done using Microsoft Scripting Runtime library (SCRRUN.DLL)
.. either with VB, VBA or VLisp.

be warned though that some antivirus software has been known to warn the end user that a potential virus is running ... I imagine this is not the thing you will want your users to think.

The version I have built is for a client, and not sharable. A little research will provide an algorithm to suit you.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
serial_no....
« Reply #3 on: August 10, 2005, 04:52:36 PM »
Hi Bob, he's after the HardDisk Drive serial No. I thought .. perhaps not :)
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Berend

  • Guest
serial_no....
« Reply #4 on: August 10, 2005, 05:10:41 PM »
Hold on if someone can explain how to upload a zip
I can share a class to determine which version of acad is installed amongst some others.

It uses the API so you won't need to run a program.
It contains a class and a sample module.

I've  stored it in my image folder (Berend) let's see if I can create a link.....http://www.theswamp.org/screens/index.php?subdir=Berend&sortby=name

well this will have to do.
You can search for version numbers of Acad, word, Excel, acrobat Reader... with this.

Bob Wahr

  • Guest
serial_no....
« Reply #5 on: August 10, 2005, 05:36:39 PM »
Quote from: Kerry Brown
Hi Bob, he's after the HardDisk Drive serial No. I thought .. perhaps not :)
Rereading his post it looks like you are right.  How about
Shell
dir d:

Sure it doesn't return it but it will let you see it :D

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
serial_no....
« Reply #6 on: August 10, 2005, 05:45:31 PM »
Probably wont suit him ... I imagine he is attempting to build some sort of protection system for software installation .. using the installed drive serial No to feed to a routine to build a unique identifier to compare with the output from a password parser.

.. but I've been wrong before :)
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

ronjonp

  • Needs a day job
  • Posts: 7533
serial_no....
« Reply #7 on: August 10, 2005, 05:47:10 PM »
If it is AutoCAD he's after, it can be retrieved by:

(getvar '_pkser)

Ron

Windows 11 x64 - AutoCAD /C3D 2023

Custom Build PC

Bob Wahr

  • Guest
serial_no....
« Reply #8 on: August 10, 2005, 06:09:02 PM »
I said it was worthless but it does give it.  You always have to "give the right answer" and "tell them what they want to know" bleh!

Ok, how about
Code: [Select]
Sub MilkToastAnd()
Dim strSerial As String
Dim varDrv As Variant
Dim varFSO As Variant

Set varFSO = CreateObject("Scripting.FileSystemObject")
Set varDrv = varFSO.GetDrive(varFSO.GetDriveName(varFSO.GetAbsolutePathName("D:\")))
strSerial = varDrv.SerialNumber
End Sub

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
serial_no....
« Reply #9 on: August 10, 2005, 06:21:20 PM »
Works for me Bob,
except that varDrv.SerialNumber returns a long, not a string.

regards
kwb
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Bob Wahr

  • Guest
serial_no....
« Reply #10 on: August 10, 2005, 07:34:29 PM »
true dat.  I figured he wanted it as a string for a list comparison but it is a long by nature.

Jürg Menzi

  • Swamp Rat
  • Posts: 599
  • Oberegg, Switzerland
serial_no....
« Reply #11 on: August 11, 2005, 04:25:35 AM »
Morning everybody

Duh, was a hard night :crazy:
Visit my homepage -> Free Stuff and search for 'VxGetAcadLicenseInfos' and 'VxGetDriveInfos'
A computer's human touch is its unscrupulousness!
MENZI ENGINEERING GmbH
Current A2k16... A2k24 - Start R2.18