April 27, 2024

MoDCore

Welcome to the core

Add desktop shortcut to URL – VBS

This is a simple VBS script that will add a desktop shortcut for a URL to a users PC.
Change the parts in bold
Set objShell = WScript.CreateObject(“WScript.Shell”)
‘All users Desktop
allUsersDesktop = objShell.SpecialFolders(“AllUsersDesktop”)
‘The current users Desktop
usersDesktop = objShell.SpecialFolders(“Desktop”)
‘Where to create the new shorcut
Set objShortCut = objShell.CreateShortcut(usersDesktop & “\SHORTCUTNAME.url”)
‘What does the shortcut point to
objShortCut.TargetPath = “ShortcutURL
‘Create the shortcut
objShortCut.Save
Copyright © All rights reserved. | Newsphere by AF themes.