Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

vbs script to create shortcut

Posted on 2012-03-30
3
Medium Priority
?
477 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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.
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
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…

916 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