Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

vbs script to create shortcut

Posted on 2012-03-30
3
Medium Priority
?
470 Views
Last Modified: 2012-04-04
I have a vbs script to create a web shortcut.  

I want to use the web icon instead of a system icon, I cant get shell32.dll, 512 to work anyway.  Its the only icon on the whole list that does not appear when the link is made.  

But anyway, the websites normally have an icon that is used for their page when shortcut is made.  Where on the system can i find this shortcut once it is made?  

So I will need to edit this vbs line...

oShellLink.IconLocation = "%systemroot%\system32\shell32.dll, 20"

Open in new window


** update**
ok I found the web .ico location and added this and it works.  However I noticed it does not work on some desktops, and shows a blank icon instead of the http://web.ico 

Is there a way to create alternative ico if one fails to work?  like
use http://web.ico
) else (
oShellLink.IconLocation = "%systemroot%\system32\shell32.dll, 20"
0
Comment
Question by:icecom4
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 37788080
The reason it fails is that not all sites have the favicon. Show us the code you are now using.
0
 

Accepted Solution

by:
icecom4 earned 0 total points
ID: 37788547
I was able to get this working, by manually downloading the favicon from the site, adding it to a location on the server, and then the scrips worked.
0
 

Author Closing Comment

by:icecom4
ID: 37805166
I was able to get this working, by manually downloading the favicon from the site, adding it to a location on the server, and then the scrips worked.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

660 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question