Month: October 2016

Automating Web URLs as Start Menu Links

Posted on Updated on

In my previous post on Creating Web URLs as Start Menu Links, I outlined details how to manually create links to URLs (as seen in the images below).  While this does work, most folks in the systems management community would prefer to automate this link creations.  The following PowerShell script can be used to create a custom start menu link for all users.

Note that a problem that you may encounter is the link not being displayed in the grouping.  This could be caused by having two .lnk files with the same target path pointing to the same URL.

# Create a Shortcut with Windows PowerShell
$oWScriptShell = New-Object -ComObject WScript.Shell
$sTargetFile = "C:\Windows\explorer.exe"
$sShortcutFile = $oWScriptShell.SpecialFolders("AllUsersPrograms") + "\Links\t3chn1ck.lnk"
# Note: to open URL in a specific browser like Edge, add in front of the URL Microsoft-edge:
$sURL = ""

#Delete existing shortcut if exists
If (Test-Path $sShortcutFile){
Remove-Item $sShortcutFile

$oShortcut = $oWScriptShell.CreateShortcut($sShortcutFile)
$oShortcut.IconLocation = "explorer.exe,20"
$oShortcut.TargetPath = $sTargetFile
$oShortcut.Arguments = $sURL

urldemo5 urldemo4

Creating Web URLs as Start Menu Links

Posted on Updated on

If you’re looking for a quick and ‘easy’ method to create shortcut links to website URLs that are part of a user’s start menu…and that can be found by Windows search…follow this simple process.

  1. Create a generic program shortcut to %windir%\explorer.exe. An easy way to do this is just browse to the executable file, right-click, and select Sent To > Desktop.urldemo1
  2. Modify the properties of the .lnk file to have:
    • The URL after the name explorer.exe; note that prefacing the URL with http:// or https:// maybe necessary.
    • Change the icon to be more website looking (optional)
    • Change the name of the shortcut to something ‘friendly’ (on the General tab)urldemo2
  3. Copy the shortcut to C:\ProgramData\Microsoft\Windows\Start Menu\Programs\CustomLinkDirectoryName\urldemo3

Now the URL shortcut will be listed in the start menu for all your users!  An added bonus is that this link will open in whatever is the user’s default browser as well.  These links can then be distributed and managed by a systems management tool such as ConfigMgr.

To automate this process using PowerShell, see my post Automating Web URLs as Start Menu Links.

urldemo4   urldemo5