Solved

vbs script to create shortcut

Posted on 2012-03-30
3
447 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
  • 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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

762 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now