Copy .RDP file to user desktop with Self Service?

mvalpreda
New Contributor II

Apologies in advance, our entire Jamf Pro environment was set up by a consultant...and I know just enough to make very minor changes.

Trying to figure out the best way to copy an .RDP file through Self Service to a user's desktop from a Windows share (or Jamf cloud storage - I did copy the file over in Jamf Admin). Anyone have a pointer on how to accomplish?

Thanks for any help!

2 REPLIES 2

mm2270
Legendary Contributor III

"I did copy the file over in Jamf Admin"

Did you package it up in some way and then copied that to Jamf Admin?

If so, where was the .rdp file located when you packaged it? To copy anything to a user's desktop usually involves some scripting, since it's unlikely the path of the file on the desktop you packaged it on would match the target machine. Generally, you'd want to place any files to be copied to specific user folder paths to first drop into a general location, like /private/tmp/. Then in a script, either included in the .pkg itself (this won't work with a .dmg format), or a separate script run from the Jamf policy set to "After", you would find all user directories, or just the current user, and then cp (copy) the file to that user's Desktop. Something like cp /private/tmp/connection.rdp /Users/<username>/Desktop/

Other ways it can be done:

1. Package it as a .DMG, then use the FEU (Fill Existing Users) option in the package settings when pushing it out. This will replace the username in the path from the DMG to whatever is sees in the same location. Meaning, if the path of the file in the DMG is something like /Users/jsmith/Desktop/connection.rdp, and the Mac has a user account on it called "jdoe" instead of "jsmith" it will copy the file instead to /Users/jdoe/Desktop/connection.rdp.

2. Another option is to forgo a package at all and just script this. This would be the option I'd choose. RDP files are very simple text files with a .rdp extension on them. It's very easy to read the contents and create the file on the fly in a script directly to the current user's desktop.

Hi,
I have the same question.
You are suggesting us to script this.
But as you might notice, someone asking how to copy RDP-Connections is a full-blooded Windows Admin and not familiar with MACOS-Scripting or how to package DMG-Files and so on.
Sure I have the textual content of that RDP.