Create website shortcuts with custom icons on user desktops and Start Menu locations
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.
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.
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.
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.
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
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.
Run this Worklet on a pilot Windows endpoint and review evaluation output for add website shortcut(s) to the desktop and/or start menu.
Confirm Automox activity logs show successful completion and exit code 0.
Verify endpoint state using checks aligned to evaluation script logic, such as Get-CimInstance, Invoke-CimMethod, Select-Object.
Validate remediation effects from script operations such as Get-CimInstance, Invoke-CimMethod, Select-Object, then rerun evaluation for compliance.


By submitting this form you agree to our Master Services Agreement and Privacy Policy.
Already have an account? Log in
Consider Worklets your easy button
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.

AUTOMOX + WORKLETS™
Uncover new possibilities with simple, powerful automation.
By submitting this form you agree to our Master Services Agreement and Privacy Policy