If you just want the default browser icon then it's probably simplest to generate the shortcut with a .url extension instead of .lnk.
Main Topics
Browse All TopicsI 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. I don't want to use the default "bowser" icon that is chosen for web based shortcuts
Thanks
set objShell = Wscript.Createobject("Wscr
strDesktopFld = objShell.SpecialFolders("D
Set objURLShortcut = objShell.createShortcut(st
'Name for Shortcut to add
objURLShortcut.Targetpath = "http://localhost:9595/web
'Path to icon
objURLShortcut.IconLocatio
'Path for Shortcut
objURLShortcut.Save
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I don't want the default icon, that is what I had and was trying to change.
To Rob, is there no way to point to the actual icon. With this method, I would need to scroll and count through each icon and try to determine, which one is number 19, 20, etc... as opposed to, if I could line them up in a window, and say, look at the thumbnails and filenames, I could quickly identify.....X as the one that I want.
But I will at least implement your idea as it gets me closer than I was 20 minutes ago
Ok, for an update, and Rob, I will give you the points, if you can give me this addendum... and really, I guess you should get the points since that does solve my issue, but building on my last comment. Do you know of a resource or site that tells me what icon goes with what number, so that I don't have to blindly pick a number, login, and see which icon I get?
Hi, I can't find a source that gives you each icon with it's number, but I did find a small start:
http://www.microsoft.com/t
there's an image at the bottom that tells you how they're numbered.
Regards,
Rob.
Business Accounts
Answer for Membership
by: RobSampsonPosted on 2008-07-22 at 14:36:34ID: 22063943
Hi, change this: n = "C:\WINDOWS\system32\oobe\ images\tha nks8.png"
n = "SHELL32.dll, 18"
objURLShortcut.IconLocatio
to this:
objURLShortcut.IconLocatio
which will get the 19th icon from SHELL32.dll
Regards,
Rob.