Skip to main content
Solved

Jamf Helper - can't find anything from GetInputSourceEnabledPrefs


Cayde-6
Forum|alt.badge.img+22
  • Honored Contributor
  • 606 replies

Has anyone ever seen these from a Policy calling a Script that only uses JamfHelper?

Script result: 2018-12-20 13:58:10.156 jamfHelper[3537:29215] isPrefsCreateCacheFromEnabledAndDefaultInputSources - can't find anything from GetInputSourceEnabledPrefs, use defaultASCIIKeyLayoutDict = {type = immutable dict, count = 3,
entries =>
0 : {contents = "InputSourceKind"} = {contents = "Keyboard Layout"}
1 : {contents = "KeyboardLayout Name"} = British
2 : {contents = "KeyboardLayout ID"} = {value = +2, type = kCFNumberSInt64Type}
}
result 0

Best answer by infuerno

I got the same error message using osascript which I note this script does.

The issue was resolved by adding an extra keyboard. See https://stackoverflow.com/q/53603246/1265167 for more info.

View original
Did this topic help you find an answer to your question?

2 replies

Cayde-6
Forum|alt.badge.img+22
  • Author
  • Honored Contributor
  • 606 replies
  • December 20, 2018

Code snippet below

#!/bin/sh
################################################################################################
# jamfHelper Variables
################################################################################################

# Get the current logged in username (jamf recommended method)
loggedInUser=$(python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "
");')

jamfHelper="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper"
icon=/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ToolbarCustomizeIcon.icns
windowType="hud"
description="Software Updates have been installed and a system restart is required. 

This system WILL reboot automatically in 4 hours OR you can reboot now by clicking the Reboot button.

After the reboot, it can take between 30 minutes to an hour to apply the updates (including after login).

If you are prompted for either Startup Disk or Update Now please click Update Now."
button1="Reboot Now"
title="Restart Required"
alignDescription="left" 
alignHeading="center"
defaultButton="1"
timeout="14400"

#################################################################################################  
# jamfHelper Window
#################################################################################################

PROMPT=$("$jamfHelper" -windowType "$windowType" -lockHUD -title "$title" -defaultButton 
"$defaultButton" -icon "$icon" -description "$description" 
-alignDescription "$alignDescription" -alignHeading "$alignHeading" -button1 "$button1" 
-timeout "$timeout" -countdown )
echo "$(date) Jamf Helper was launched for Software Update Reboot Prompt" >> /var/log/JAMFSoftwareUpdates.log
echo "result $PROMPT"

    if [ "$PROMPT" == "0" ]; 
    then
        sudo -u ${loggedInUser} osascript -e 'tell app "System Events" to restart'
    fi

exit 0

Forum|alt.badge.img+2
  • New Contributor
  • 1 reply
  • Answer
  • January 2, 2019

I got the same error message using osascript which I note this script does.

The issue was resolved by adding an extra keyboard. See https://stackoverflow.com/q/53603246/1265167 for more info.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings