Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script/Policy for autorename "My Computer" to Computers DNS name

Status
Not open for further replies.

Schirmag

Technical User
Jan 24, 2002
9
0
0
DE
Hallo,

we´ve an Active Directory 2000 and i want to autorename the "My Computer" icon on the desktop to the computers DNS name.

Did anyone have a logon script or a Group Policy ?

Thank you for your help!

Kind Regards,
Matthias
 
This is a start:

Renames the My Computer icon on the local computer, giving it the same name as the computer itself.

Const MY_COMPUTER = &H11&
Set objNetwork = CreateObject("Wscript.Network")
objComputerName = objNetwork.ComputerName
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(MY_COMPUTER)
Set objFolderItem = objFolder.Self
objFolderItem.Name = objComputerName


You can fiddle with it to get it to do what you want, but no promises....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top