Article:
 |
|
Creating Desktop Shortcuts Using Visual Basic
|
| Subject: |
|
Quick and Easy Solution |
| Date: |
|
2005-10-08 06:27:13 |
| From: |
|
cpgguru
|
|
|
'*****************************************************
'* Create Shortcut to URL Link on AllUsersDesktop '*
'* scripted by: cpgguru '*
'*****************************************************
URL = "URL=http://www.oreillynet.com"
DIM fso, File
Dim WSHShell, DesktopPath
Set WSHShell = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
'Read desktop path using WshSpecialFolders object - "Desktop","AllUsersDesktop","Favorites","StartMenu","AllUsersStartMenu"
'"Startup","AllUsersStartup"
DesktopPath = WSHShell.SpecialFolders("AllUsersDesktop")
Set File = fso.CreateTextFile(DesktopPath & "\oreillynet.url", True)
File.WriteLine("[InternetShortcut]")
File.Write (URL)
'File.Write ("same line write")
File.Close
|
Showing messages 1 through 1 of 1.
-
Quick and Easy Solution
2005-10-08 06:31:38
cpgguru
[View]
This way you can have a hybrid solution to your tip and VBScripting at the same time!