Using VBScript to Rename "My Computer" Icon to "My Computer + computername" via GPO
1. Create a VBScript, Name "rename My Computer.vbs". Here is script content.
option explicit
dim objNetwork, objShell, strComputer, objFolder, objFolderItem
Const MY_COMPUTER = &H11&
Set objNetwork = CreateObject("Wscript.Network")
Set objShell = CreateObject("Shell.Application")
strComputer = objNetwork.ComputerName
Set objFolder = objShell.Namespace(MY_COMPUTER)
Set objFolderItem = objFolder.Self
objFolderItem.Name = "My Computer " & strComputer
2. Save VBScript to \\DC\SYSVOL\DomainName\Policies\Scripts\Logon
3. Open Group Policy, on the User Configuration section, go to Windows settings, go to Script(Logon/Logoff), double click on Logon, add the VBScript network path.
I've been using this script for years. However, with Windows 8.1 they have just started naming "My Computer" to "This PC" and I can't get this script to work anymore.
ReplyDeleteScratch that. Just need to ammend My_Computer and My Computer to This_PC and This PC in the script
ReplyDelete