'========================================================================== 'ChangeComputerOwner.vbs 'Created by Timothy Bourne. 'http://www.imric.co.uk 'Last Modified: 28th March 2006 '========================================================================== 'This VBscript will allow the user to input a new Owner and Orginisation '(as shown in system properties) name for the computer. '========================================================================== Option Explicit Dim WshShell Dim ObjText, ObjVersion, ObjInfo, ObjOwner, ObjOrg, ObjBox ObjText = "Change Owner and Organization Utility" 'Open a connection to the registry and read values. Set WshShell = WScript.CreateObject("WScript.Shell") ObjVersion = "HKLM\Software\Microsoft\Windows NT\CurrentVersion\" ObjInfo = "HKCU\Software\Microsoft\MS Setup (ACME)\User Info\" ObjOwner = WshShell.RegRead(ObjVersion & "RegisteredOwner") ObjOrg = WshShell.RegRead(ObjVersion & "RegisteredOrganization") 'Inputbox to enter owner name. ObjBox = InputBox("Type new Owner and click OK.", ObjText, ObjOwner) 'If something has been entered then write the data to registry. If ObjBox <> "" Then WshShell.RegWrite ObjVersion & "RegisteredOwner", ObjBox WshShell.RegWrite ObjInfo & "DefName", ObjBox End If 'Inputbox to enter organisation name. ObjBox = InputBox("Type new Organisation and click OK.", ObjText, ObjOrg) If ObjBox <> "" Then 'If something has been entered then write the data to registry. WshShell.RegWrite ObjVersion & "RegisteredOrganization", ObjBox WshShell.RegWrite ObjInfo & "DefCompany", ObjBox End If WScript.Echo "Owner and Organisation information has been changed."