Windows
View all Worklets
WindowsWindows

Add Website Shortcut(S) to the Desktop and/Or Start Menu

Create website shortcuts with custom icons on user desktops and Start Menu locations

Worklet Details

What the Website Shortcut Creator does

This Automox Worklet™ creates .lnk shortcut files that open specified websites when clicked. Unlike simple URL files, these shortcuts can display custom icons and appear alongside application shortcuts on the desktop and in the Start Menu. The Worklet uses the WScript.Shell COM object to create properly formatted Windows shortcuts.

You upload a custom icon file (.ico format) to the Automox console along with the Worklet. During remediation, the Worklet copies this icon to %WinDir%\Temp for persistent storage, then creates shortcuts pointing to your specified URL with the custom icon reference. The icon file persists across reboots.

The Worklet supports flexible targeting through an array of paths. You can target the current user's desktop, OneDrive-synced desktop locations, the Public desktop (for all users), user-specific Start Menu folders, or the All Users Start Menu. Multiple paths can be specified to cover different environment configurations.

Why deploy website shortcuts through Automox

Providing shortcuts to internal web applications improves user productivity and reduces help desk requests about how to access specific resources. New employees can find critical applications on their desktop from day one. Shortcuts also help standardize how users access applications rather than relying on bookmarks that vary between browsers.

Custom icons make shortcuts visually distinguishable and professional. Instead of generic browser icons, users see company or application logos that match the actual web application branding. This visual consistency improves the user experience and makes resources easier to locate.

The Worklet handles the complexity of identifying correct desktop paths, which vary across environments. Some organizations redirect desktops to OneDrive, others use traditional local paths, and some have both. By specifying multiple potential paths, the Worklet creates shortcuts wherever they will actually be visible to users.

How website shortcut creation works

  1. Evaluation phase: The Worklet iterates through each path in $shortcutPaths, checks if the path exists using Test-Path, and then checks if the shortcut file ($shortcutName) already exists at that location. If shortcut files exist at all valid paths, the endpoint is compliant. If any valid path is missing the shortcut, the endpoint is flagged for remediation.

  2. Remediation phase: The Worklet copies the uploaded icon file to %WinDir%\Temp. For each valid path in $shortcutPaths, it creates a WScript.Shell COM object, generates a shortcut at the target location with the specified URL as TargetPath, and sets the IconLocation to the copied icon file. The shortcut is saved using the COM object's Save method.

Website shortcut requirements

  • Windows 8 or later

  • PowerShell 3.0 or later

  • Upload icon file (.ico) to the Automox console

  • Configure $icon with uploaded icon filename (e.g., 'favicon.ico')

  • Configure $webLink with target URL (e.g., 'https://console.automox.com/login')

  • Configure $shortcutName with shortcut display name including .lnk extension

  • Configure $shortcutPaths array with target locations (use $currentUser variable for user-specific paths)

  • Variables must be identical in evaluation and remediation scripts

Expected state after shortcut creation

After successful remediation, shortcuts appear on the desktop and/or Start Menu at all specified valid paths. Clicking the shortcut opens the configured URL in the user's default browser. The custom icon displays in Windows Explorer and on the desktop. The icon file persists at %WinDir%\Temp\{iconname}.

If some paths do not exist (such as OneDrive desktop paths on endpoints without OneDrive), those paths are skipped without error. The Worklet only creates shortcuts at paths that actually exist on the endpoint. If the icon file fails to copy, shortcuts may show a generic icon or broken icon reference.

How to validate add website shortcut(s) to the desktop and/or start menu changes

  1. Run this Worklet on a pilot Windows endpoint and review evaluation output for add website shortcut(s) to the desktop and/or start menu.

  2. Confirm Automox activity logs show successful completion and exit code 0.

  3. Verify endpoint state using checks aligned to evaluation script logic, such as Get-CimInstance, Invoke-CimMethod, Select-Object.

  4. Validate remediation effects from script operations such as Get-CimInstance, Invoke-CimMethod, Select-Object, then rerun evaluation for compliance.

View in app
evalutation image
remediation image

Consider Worklets your easy button

What's a Worklet?

A Worklet is an automation script, written in Bash or PowerShell, designed for seamless execution on endpoints – at scale – within the Automox platform. Worklet automation scripts perform configuration, remediation, and the installation or removal of applications and settings across Windows, macOS, and Linux.

do more with worklets