Option Explicit Set ws = WScript.CreateObject("WScript.Shell") Dim ws, t, p1, p2, n, cn, vbdefaultbutton Dim itemtype p1 = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\" n = ws.RegRead(p1 & "ProductId") t = "Read Your Product ID" cn = InputBox("This is your Product ID Number", t, n) If cn <> "" Then ws.RegWrite p1 & "ProductId", cn End If