Hi,
I have a google drive link that I made into a website HTTP file and I want to populate it on the desktop for all users who log in to our computers with their active directory account. What is the best way to go about this?
Hi,
I have a google drive link that I made into a website HTTP file and I want to populate it on the desktop for all users who log in to our computers with their active directory account. What is the best way to go about this?
Best answer by mm2270
Do you utilize the Self Service application in your environment? If so, it's probably easier to use a Self Service bookmark for this. It will always be there and can be easily pulled or updated at any time from the Jamf console. You can also add a brief description to it, something you can't really do with a weblink living on someone's Desktop.
But.... if you really want to go the route of using what's known as a "webloc" file, they can be created directly in a script and put anywhere you want to drop them. Something like this would work.
#!/bin/zsh
logged_in_user=$(/usr/sbin/scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ {print $3}')
webloc_filename="$4"
webloc_address="$5"
webloc_data='<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>URL</key>
<string>'$webloc_address'</string>
</dict>
</plist>'
cat << EOWEBLOC > "/Users/${logged_in_user}/Desktop/${webloc_filename}.webloc"
$webloc_data
EOWEBLOCFrom a Jamf policy when running this script, you can supply a filename for the resulting webloc file, and the URL it will use in parameters 4 and 5, respectively. It should generate a .webloc file with the name and address you specified on the currently logged in user's Desktop. From there, double clicking the file should open the URL in their default browser.

Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.