macadmins / SplashBuddy

Onboarding splash screen for MDM and Automated Device Enrollment.
Apache License 2.0
403 stars 70 forks source link

Feature Request: Ghost Pkg/script that set's 'Installed'/'green jelly' if smart group criteria is met / software is installed #64

Open xinput opened 6 years ago

xinput commented 6 years ago

Hello,

I have the following scenario: We have dozens of macs that are in production. No one is actually enrolled in JAMF. When i enroll them in JAMF SB will start and install required software. Each of my enroll policies is bound to a smart group which checks is software is already installed. If it's already installed software is skipped.

The problem: To tell SB that this skipped software is not 'required' i have set canContinue in every item to YESwhich cause that the user can quit SB immediately. When i set one item to NO and the installation is skipped because software is already installed, SB will stuck and user can't quit.

(possible) Solution: create a ghost pkg or a script which checks himself if software is already installed or (don't know if this is possible) checks if the criteria of the smart group which is scoped in this policy is met. if yes return value installed.

ssnak3 commented 6 years ago

Hi,

Don't know if I can help, but since in my environment most of the packages are DMG and we are using ghostpkg script for all application, I added a different part in the script that handles the detections, which makes the script more accurate.

This is the code I added to z02sb_ghostpkg script:

# Check if application is installed
# Enter Application path in $4
if [[ "$4" != "" ]] && [[ -d "$4" ]]
    then
        status=Installed
    else
        status=Failed
fi

So I enter in variable 4 path of the installed application if the application is not present it will put Failed status.

The problem I am facing is similar with your, if I put YES in canContinue user can quite immediately, if I put NO user cannot exit if one of software failed which I don't want. I wonder if I am doing something wrong.