Retrieving Windows Product Key using VB Script
In this article, I present the simple and safe method to retrieve product key of Windows operating system using VB Script. The VB Script reads the value of Windows product from the Registry Editor ( regedit ) and translates it to a formatted product key (25 alphanumeric characters). Also, it creates the backup of the product information to the local drive (Desktop). Instructions Step 1: Create a VB Script file “ WinProductKey.vbs ” using any ASCII text editor and enter the following codes. Source Code Dim objshell, path, DigitalID Set objshell = CreateObject("WScript.Shell") 'Set registry key path Path = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\" 'Registry key value DigitalID = objshell.RegRead(Path & "DigitalProductId") Dim ProductName, ProductID, ProductKey, ProductData 'Get ProductName, ProductID, ProductKey ProductName = "Product Name: " & objshell.RegRead(Path & "ProductName") ProductID = ...