asked on
I have the following vbs script running as a logon script. But everytime it runs, When the shortcut is created, it is created with the symbol of no icon. How can I direct the icon location to an actual windows system icon file. When I open up a file via properties, and browse for a new icon, it directs me to look in shell32.dll, but I can't find a way to get to all of those icons shown in that window.
Thanks
set objShell = Wscript.Createobject("Wscript.Shell")
strDesktopFld = objShell.SpecialFolders("Desktop")
Set objURLShortcut = objShell.createShortcut(strDesktopFld & "\Install-CoM-Applications.lnk")
'Name for Shortcut to add
objURLShortcut.Targetpath = "http://localhost:9595/webportal/webportal.exe"
'Path to icon
objURLShortcut.IconLocation = "C:\WINDOWS\system32\oobe\images\thanks8.png"
'Path for Shortcut
objURLShortcut.Save
set objShell = Wscript.Createobject("Wscript.Shell")
strDesktopFld = objShell.SpecialFolders("Desktop")
Set objURLShortcut = objShell.createShortcut(strDesktopFld & "\Install-CoM-Applications.url")
'Name for Shortcut to add
objURLShortcut.Targetpath = "http://localhost:9595/webportal/webportal.exe"
'Path for Shortcut
objURLShortcut.Save
ASKER
ASKER
VBScript (Visual Basic Scripting Edition) is an interpreted scripting language developed by Microsoft that is modeled on Visual Basic, but with some important differences. VBScript is commonly used for automating administrative and other tasks in Windows operating systems (by means of the Windows Script Host) and for server-side scripting in ASP web applications. It is also used for client-side scripting in Internet Explorer, specifically in intranet web applications.
TRUSTED BY
objURLShortcut.IconLocatio
to this:
objURLShortcut.IconLocatio
which will get the 19th icon from SHELL32.dll
Regards,
Rob.