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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rename the "my Computer" icon with vbs

Status
Not open for further replies.

wirk

MIS
Jan 20, 2003
40
US

Found the vbs function below on the Internet (don't remember where), anyway I added it to markdmac's logon script (add on code section). The script runs, no errors. But this function does not work.

Any idea's,
Thanks in advance.

Function RenameMyComp ()
' Rename the "my Computer" icon

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

End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top