How do I make an installer interactive that is deployed from self service?

dlprentice
New Contributor III

Is it possible to make an installer display the interactive installer dialog when deploying via self service?

1 ACCEPTED SOLUTION

mm2270
Legendary Contributor III

Ah, I see. So, this package looks to me like it's a bunch of scripts embedded within it, and the options show up as choices to the user when they run it.

Rather than try to get the installer to run as admin, but show up for the user, which might be a little tricky, you should take a look at their Mac admins page here: https://office-reset.com/macadmins/
It has some info on how to download the individual packages for each option rather than one big one. There's even a for Jamf admins section that has some instructions on how you can use it in Jamf Pro. I would at least take a look at that to see if those options work for you before trying to do anything with the user specific package.

View solution in original post

8 REPLIES 8

Rebry
New Contributor III

I guess you can download the package to the machine, then run the script "open filename" and add the whole top one as a self-service package

mm2270
Legendary Contributor III

@dlprentice Can you explain what the need is here? Why do you want to make the installer interactive when run from Self Service? I'm not saying it's impossible to do this, but I'm curious why you'd need that to happen?

dlprentice
New Contributor III

@mm2270 I want users to select what they'd like fixed when running this app https://office-reset.com/

cbrewer
Valued Contributor II

You could use a script to curl the package (https://office-reset.com/download/Microsoft_Office_Reset_1.4.pkg) and then open it.

Edit: This would get you started...

#!/bin/bash

# Variables
downloadUrl="https://office-reset.com/download"
pkgName="Microsoft_Office_Reset_1.4.pkg"

# Get current user
loggedInUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )

if [[ -n ${loggedInUser} ]]; then
  echo "Downloading and opening pkg as ${loggedInUser}"

  tmpDir=$(su -l ${loggedInUser} -c "mktemp -d")
  echo "Temp dir set to ${tmpDir}"

  # Download package to tmpDir
  su -l ${loggedInUser} -c "curl -Ss ${downloadUrl}/${pkgName} -o ${tmpDir}/${pkgName}"

  # Check for successful download
  if [[ ! -f "${tmpDir}/${pkgName}" ]]; then
    echo "Download unsuccessful"
    exit 1
  fi

  su -l ${loggedInUser} -c "open ${tmpDir}/${pkgName}"
fi

mm2270
Legendary Contributor III

Ah, I see. So, this package looks to me like it's a bunch of scripts embedded within it, and the options show up as choices to the user when they run it.

Rather than try to get the installer to run as admin, but show up for the user, which might be a little tricky, you should take a look at their Mac admins page here: https://office-reset.com/macadmins/
It has some info on how to download the individual packages for each option rather than one big one. There's even a for Jamf admins section that has some instructions on how you can use it in Jamf Pro. I would at least take a look at that to see if those options work for you before trying to do anything with the user specific package.

wmehilos
Contributor

You can also use a tool like Suspicious Package or Pacifist to extract the scripts from the Office Reset pkg and just rehost them on your distribution point so users can just run them straight from Self Service.

Rebry
New Contributor III

@wmehilos Thats an great way to approach it! i see the developer points out that you are free to use Suspicious Package or Pacifist to look at the scripts. You can then, if needed, just copy paste the scripts you do need, and enable each of them in self service as an policy.

dlprentice
New Contributor III

Thanks everyone for your responses I'm in good shape now!