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 Desktop ICon

Status
Not open for further replies.

finatic

Technical User
Jun 19, 2003
36
US
Hello there,
Can someone please tell me if there is an easy way to rename a desktop icon that was distributed via a scipt or some other method? The icon is a "telnet.exe ispa" that points to an IBM RS6000 when we rename the icon it works perfectly. What we want to do is to do this once for all dekstops about 150 of them. Any help will be appreciated.
 
Here's part of a VBS script I wrote to create a shortcut to a folder in the root called C:\Local Files. You can probably extract and modify the objects/methods that you need from this:

[tt]
On Error Resume Next
Dim objWMIService, WshNet, Shell, FSO

strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "!\\" & strComputer & "\root\cimv2")
Set WshNet = WScript.CreateObject("Wscript.Network")
Set Shell = WScript.CreateObject("WScript.Shell")
Set FSO = Wscript.CreateObject("Scripting.FileSystemObject")
DesktopPath = Shell.SpecialFolders("Desktop")

If Not FSO.FileExists(DesktopPath + "\Local Files.lnk") Then
Set linkLocalFiles = Shell.CreateShortcut(DesktopPath + "\Local Files.lnk")
linkLocalFiles.Description = "Shortcut to Local Files on local drive. Place your personal files and other documents in this directory that should not reside on the server."
linkLocalFiles.TargetPath = "C:\Local Files"
linkLocalFiles.IconLocation = "%SystemRoot%\system32\SHELL32.dll, 66"
linkLocalFiles.WorkingDirectory = "C:\Local Files"
linkLocalFiles.Save
End If[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top