Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (14 sloc) 624 Bytes
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' GetInstallDriveSerialNumber.rvb -- February 2010
' If this code works, it was written by Dale Fugier.
' If not, I don't know who wrote it.
' Works with Rhino 4.0.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
Sub GetInstallDriveSerialNumber()
Dim oFSO, oDrive, xSerial
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oDrive = oFSO.GetDrive(oFSO.GetDriveName(Rhino.InstallFolder()))
xSerial = Hex(oDrive.SerialNumber)
MsgBox Left(xSerial,4) & "-" & Right(xSerial,4)
End Sub