任意のURLのショートカットをスタートアップフォルダに作成する。
Option Explicit
' ★★★ユーザー設定ここから。★★★
' ショートカット名を定義
Const SC_NAME = "ショートカット"
Const SC_LINK = "https://www.google.co.jp/"
' ★★★ユーザー設定ここまで。★★★
' Shellオブジェクト
Dim objShell: Set objShell = CreateObject("WScript.Shell")
' ショートカットを作成する
Dim newShortcut
Set newShortcut = objShell.CreateShortcut( objShell.SpecialFolders("Startup") + "\" + SC_NAME +".url")
newShortcut.TargetPath = SC_LINK
newShortcut.Save
' 確認のためスタートアップフォルダを表示
CreateObject("Shell.Application").Explore(objShell.SpecialFolders("Startup"))
' オブジェクト解放
Set newShortcut = Nothing
Set objShell = Nothing
' メッセージを表示
Msgbox "ショートカットを作成しました。", vbOKOnly + vbInformation, WScript.ScriptName