I need to deploy a shortcut to C:\Users\Public\Desktop. I need to deploy a shortcut to the desktop of the user currently connected to Windows on the targets. |
A- Deploy a shortcut for all users of the device - Create an Operational Rule - Add the Step called " Create Shortcut" and set it: - Shortcut Path = the path to where the new shortcut must be set, including the name the shortcut will have - In this example the shortcut BCM.lnk" will be created in C:\Users\Public\Desktop\, which will make it available to any user that will open a session on this device
- Target Path: the path to the application on the hard drive, or the path to the share that this shortcut should open - In this example it's leading to a URL - Icon File: the path to the icon .ico that will be used by the shortcut. The icon needs to already exist on the target. If not available then the operational rule will have to include a package that will deploy it
B- Deploy a shortcut to the desktop of the current user By default the agent runs operational rules and packages as the Windows user "System". Because of this it cannot create the shortcut to the desktop of the user currently connected to a Windows session on the target. B1- The step is the only one in the operational rule:
- set the shortcut path to "${USERPROFILE}\Desktop" - set the other field as described in A- - assign the operational, but click on "No" when asked if the default schedule must be used at the time of the assignment - right click on the assigned object and select the option "Run as Current User" then click "OK" - right click on the assigned object and select "Activate Operational Rule" B2- The step is part of an operational rule that must run as "System" Use the step "Create Shortcut as Current User" instead. Note: It's easier to include a screenshot in a package, as described in the KA 000209819: Client Management: How to Create a Shortcut using a package |