Advertisement
6_2008-2009 Internet/ Browsers/ HTML #211717

Adding website's shortcut to desktop through website

To create a desktop website's shortcut through the website

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
<BR><BR><small> <b>Adding link to the web browser's favourites is not a big deal. But to create shortcut of your website at the user's desktop is cool. And its pretty easy. 
<BR><BR>Its simple, you create a VBS file (lets say abcd.vbs) with the following code:<BR><BR>
<table><tr><td nowrap>
dim WshShell, strDesktop, oUrlLink<BR>
set WshShell = CreateObject("WScript.Shell")<BR>
strDesktop = WshShell.SpecialFolders("Desktop")<BR>
set oUrlLink = WshShell.CreateShortcut (strDesktop + "\Your website's shortcut.URL")<BR>
oUrlLink.TargetPath = "http://www.yahoo.com" <BR>
oUrlLink.Save<BR><BR>
</td></tr></table>
You change the URL link in the second last line to your website URL and you can rename the shortcut name which will appear on the user's desktop, in the third last line.<Br><BR>
Now add the following code in the HTML where you want this functionality:<BR>
&lt;a href="abcd.vbs"&gt;Add shortcut to Desktop&lt;/a&gt; <BR><BR>
Try it out, if you find it good enough then vote for this article.</b></small>
Original Comments (3)
Recovered from Wayback Machine