Addigy's Smart Software features provide lots of flexibility for deploying files and apps to your devices. This article provides the simplest workflow for pushing a file your users' desktops that opens a specific URL, then this article will give you the simplest workflow.
First, download the "Open A Webpage.webloc" file that is attached to this article. Replace the inside of <string>https://www.addigy.com</string> with your URL and rename the file to your liking. Make sure that it still has the .webloc extension to the file.
Next, create a Smart Software payload and upload the .webloc file.
In the Smart Software item, copy these scripts to correctly move the .webloc file onto each user's desktop. Modify the content of the first line inside of the quotation marks to be the filename of your .webloc file.
Installation script:
filename="Open A Webpage.webloc" for user in $(dscl . list /Users UniqueID | awk '$2 >= 500 {print $1}'); do userHome=$(dscl . read /Users/$user NFSHomeDirectory | awk '{print $2}') if [ -e "${userHome}/Desktop/${filename}" ]; then continue else if [ ! -d "${userHome}/Desktop" ]; then echo "User:${user} does not have a valid Desktop directory. Skipped this user." continue fi cp "./${filename}" "${userHome}/Desktop/${filename}" chown ${user}:staff "${userHome}/Desktop/${filename}" chmod 644 "${userHome}/Desktop/${filename}" fi done
Condition script:
filename="Open A Webpage.webloc" for user in $(dscl . list /Users UniqueID | awk '$2 >= 500 {print $1}'); do userHome=$(dscl . read /Users/$user NFSHomeDirectory | awk '{print $2}') if [ ! -e "${userHome}/Desktop/${filename}" ]; then echo "User does not have desktop link for ${filename}. Adding it..." exit 0 else continue fi done echo "All users had the ${filename} link." exit 1
Give your next Smart Software some rigorous testing, and you're good to go. Your users will now be able to access that web resource quickly and easily using the new desktop icon they have.