Adding website's shortcut to desktop through website
To create a desktop website's shortcut through the website
Original Author: Kapil Bhagia
Code
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.
Its simple, you create a VBS file (lets say abcd.vbs) with the following code:
dim WshShell, strDesktop, oUrlLink
set WshShell = CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
set oUrlLink = WshShell.CreateShortcut (strDesktop + "Your website's shortcut.URL")
oUrlLink.TargetPath = "http://www.yahoo.com"
oUrlLink.Save
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.
Now add the following code in the HTML where you want this functionality:
<a href="abcd.vbs">Add shortcut to Desktop</a>
Try it out, if you find it good enough then vote for this article.
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.