Option Explicit Set ws = WScript.CreateObject("WScript.Shell") Dim ws, t, p1, p2, n, cn, vbdefaultbutton Dim itemtype p1 = "HKLMSYSTEMCurrentControlSetControlComputerNameComputerName" n = ws.RegRead(p1 & "ComputerName") t = "Change Computer Name" cn = InputBox("Type new Name and click OK", t, n) If cn <> "" Then ws.RegWrite p1 & "ComputerName", cn End If
Last Updated on October 26, 2015