Create a shortcut with VBScriptTag(s): WSH VBScript

A shortcut is special binary file with the .lnk extension.
Set WshShell = CreateObject("WScript.Shell")
strDesktopPath = WshShell.SpecialFolders("Desktop")
'
'   or  strDesktopPath = WshShell.SpecialFolders("AllUsersDesktop")
'
Set objShortcutUrl = WshShell.CreateShortcut(strDesktopPath & "\textpad.lnk")
objShortcutUrl.TargetPath = "C:\Program Files\TextPad 4\textpad.exe"
objShortcutUrl.Description = "Start Textpad"
objShortcutUrl.Save
To create a shortcut from Powerbuilder, see this HowTo.

To create an Internet shortcut, see this HowTo




If you find this article useful, consider making a small donation
to show your support for this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2012
[ home ]