'ProductID.vbs - Retrieve the Windows Product (CD) Key
'© Doug Knox - dbknox@mediaone.net - rev 21 NOV 1999.

Option Explicit:Dim ws, boxtitle, regkey1, cdkey, vbCR, boxtext, MyBox

vbCR = Chr(13)

Set ws = WScript.CreateObject("WScript.Shell")

boxtitle = "Retrieve Windows 95/98 Product Key"

regkey1 = "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\"

cdkey = ws.RegRead(regkey1 & "ProductKey")

boxtext = "Your Windows 95/98 Product Key is:      " & vbCR & vbCR

MyBox = MsgBox(boxtext & cdkey, 4160, boxtitle)