- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
03-27-2018
07:23 AM
- last edited
a week ago
by
kh-richa_mig
Hello all,
I'm looking to deploy Prey 1.7.3 to a test MacBook. An API key is needed at the time of install. How do I incorporate that key into an install workflow? Is there a script out there already that accomplishes this? I did a search and didn't come up with anything that worked. The Policy tries .pkg first, it fails, and then the command line API key afterwards.
Thanks.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 03-27-2018 07:38 AM
Hey, I stumbled across Prey in another thread that had a script to install Prey and if I could remember who posted it I would give credit. However I have blinked since then. Here is the script that I saw attached to the forgotten post.
Just create a policy that runs this script and you are good to go.
#!/bin/sh
#download prey
curl -o /private/tmp/prey-mac-1.7.3-x64.pkg "https://downloads.preyproject.com/prey-client-releases/node-client/1.7.3/prey-mac-1.7.3-x64.pkg"
#Run Prey Installer
API_KEY=YOURKEY sudo -E installer -pkg /private/tmp/prey-mac-1.7.3-x64.pkg -target /
#Remove Temp File
rm /private/tmp/prey-mac-1.7.3-x64.pkg
exit 0
This worked flawlessly.
Shaun

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 03-27-2018 07:38 AM
Hey, I stumbled across Prey in another thread that had a script to install Prey and if I could remember who posted it I would give credit. However I have blinked since then. Here is the script that I saw attached to the forgotten post.
Just create a policy that runs this script and you are good to go.
#!/bin/sh
#download prey
curl -o /private/tmp/prey-mac-1.7.3-x64.pkg "https://downloads.preyproject.com/prey-client-releases/node-client/1.7.3/prey-mac-1.7.3-x64.pkg"
#Run Prey Installer
API_KEY=YOURKEY sudo -E installer -pkg /private/tmp/prey-mac-1.7.3-x64.pkg -target /
#Remove Temp File
rm /private/tmp/prey-mac-1.7.3-x64.pkg
exit 0
This worked flawlessly.
Shaun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 03-27-2018 07:42 AM
Thanks a lot! Much appreciated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 04-22-2019 06:16 AM
How did you get the API_KEY from the Prey installation? Looks like a good way to send out the installer to a device you don't have your hands on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 04-22-2019 07:44 AM
@vvanier It's on your account settings page on the Prey Project website:
