Posted on
11-12-2020
04:56 AM
- last edited
3 weeks ago
by
kh-richa_mig
Hi
We use Mac and Windows with Outlook in our school
In the group policy I can configure default fonts for Windows
How can I configure Default Fonts for Mac for all the users in the organization
Kind regards,
Solved! Go to Solution.
Posted on 11-12-2020 05:37 AM
Posted on 11-12-2020 05:37 AM
Posted on 11-01-2021 06:04 AM
Hi how do I get the script to work? I added it to scripts in Jamf but it doesn't work. The message that pops up says that the registry does not exists for MicrosoftRegistrationDB.reg and no such file or directory, Registry could not be created
Posted on 11-15-2020 06:01 AM
@sdagley - I have played with the script and sorted it
Thank you so so much for this
Kind regards,
Posted on 11-12-2021 03:05 PM
Hi everyone,
Would someone be able to explain how to deploy this OutlookFontPoke script for Arial 11?
I am failing to understand the logic of the script, it's dirving me insane.
Thank you
Posted on 02-24-2021 02:12 PM
I'm trying to get this to run at login. Here is what I have but it is not working.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.mycompany.fontpoke</string>
<key>Program</key>
<string>/Users/Shared/OutlookFontPoke.sh</string>
<key>ProgramArguments</key>
<array>
<string>'Arial' '12.0pt' 'black'</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
I have also tried splitting the program arguments out as separate strings in the array, and also removing the ' ' . No luck.
Posted on 02-24-2021 06:07 PM
@DavidN A couple of problems in what you're trying:
- The OutlookFontPoke.sh script looks to be designed to be run by the logged in user's account, but if you're running from a LaunchDaemon it'll be running as root
- You shouldn't use both the Program
and ProgramArguments
keys. ProgramArguments
is what you should be using, and the first 2 items in your array would be:
<string>/bin/sh</string>
<string>/Users/Shared/OutlookFontPoke.sh</string>
...
A good guide to LaunchAgents/Daemons is https://launchd.info
You'll also find the article Running a Command as another User helpful.
Posted on 02-25-2021 06:38 AM
Thanks for the response. I am running this as a launchAgent and have tried it both in /Library/LaunchAgents as well as ~/Library/LaunchAgents. I have also tried the syntax you have above /bin/sh with the script. It also needs parameters passed into it.
'Arial' '12.0pt' 'black'
I thought the parameters would be ProgramArguments while the Program would be the script itself. Is that not correct?
Posted on 02-25-2021 11:34 AM
Here's the answer:
:)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.mycompany.fontpoke</string>
<key>ProgramArguments</key>
<array>
<string>/Users/Shared/OutlookFontPoke.sh</string>
<string>Arial</string>
<string>12.0pt</string>
<string>black</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
Posted on 11-12-2021 03:06 PM
Hi everyone,
Would someone be able to explain how to deploy this OutlookFontPoke script for Arial 11?
I am failing to understand the logic of the script, it's dirving me insane.
Thank you
Posted on 04-04-2023 09:04 PM
Trying to use OutlookFontPoke both locally and through Jamf. Getting "OutlookFontPoke: command not found" when trying to run OutlookFontPoke from pbowden using the example command:
https://github.com/pbowden-msft/OutlookFontPoke
Thinking that I was doing something wrong I tried using outlookFontSet from quedayone but getting the same error:
https://github.com/quedayone/jamf-pro-scripts/blob/master/outlookFontSet.sh
Just need to set a default font for Outlook (I was able to get Word and PP to accept Normal.dotm and Normal.potx but Outlook doesn't seem to load NormalEmail.dotm anymore as a template...)
Posted on 04-20-2023 08:21 AM
In working with Paul Bowden (author of OutlookFontPoke), we were able to come up with a deployable version of this script. This is how we did it:
1. Drop OutlookFontPoke and TemplateRegDB.reg on the system in an accessible location (I kept it in the folder OutlookFontPoke-master and dropped it in Users/Shared)
2. In Jamf Scripts, create a script with these commands:
#!/bin/bash
#send command to OutlookFontPoke v2.1 by Paul Bowden
#https://github.com/pbowden-msft/OutlookFontPoke/archive/refs/heads/master.zip
#pbowden@microsoft.com
#Get Current User
loggedInUser=$(/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }')
echo $loggedInUser " is logged in"
#fix permissions
chmod +x /Users/Shared/OutlookFontPoke-master/OutlookFontPoke
# Run command as current logged in user
sudo -u $loggedInUser /Users/Shared/OutlookFontPoke-master/OutlookFontPoke 'Helvetica' '11.0pt' 'gray'
# Cleanup files
rm -rf /Users/Shared/OutlookFontPoke-master
exit 0
3. Add both the package and script (script priority set to after) to a policy to run at your needed cadence. This is a one time set and is not enforced so the user can change it in Outlook settings.
I am trying to make it a bit more future proof by adding in Parameter Values but it am having issues passing into or with ' ' (any suggestions would be greatly appreciated, can't remember/find how)
Posted on 05-02-2023 06:47 AM
This worked perfectly. Thank you so much for simplifying it.
2 weeks ago
Not sure if I did something unusual but I think I got it to work with parameters and didn't need any of the extra stuff from your comment.
Is the fact that I ran it from Self Service a factor here?
2 weeks ago
No, running from Self Service makes no difference.
I used a newer Version of the OutlookFontPoke from here:
https://github.com/AlyaKoni/OutlookFontPoke/tree/master
I created a PKG for that script which installs into
/usr/local/OutlookFontPoke/
My Script for setting up Font parameters via Jamf Policy:
#!/bin/bash
#send command to OutlookFontPoke v2.1 by Paul Bowden
#https://github.com/pbowden-msft/OutlookFontPoke/archive/refs/heads/master.zip
#pbowden@microsoft.com
# Variables
nameFont=$4 #eg "Arial"
echo "### nameFont - $nameFont"
sizeFont=$5 #eg "11.0pt"
echo "### sizeFont - $sizeFont"
colorFont=$6 #eg "gray"
echo "### colorFont - $colorFont"
pathToScript="/usr/local/OutlookFontPoke/OutlookFontPoke-2.1.sh"
#Get Current User
loggedInUser=$(/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }')
echo $loggedInUser " is logged in"
#fix permissions
chmod +x "$pathToScript"
# Run command as current logged in user
sudo -u $loggedInUser $pathToScript $nameFont $sizeFont $colorFont
exit 0
My settings for the Script in the Jamf Console look like this:
And the Policy settings are like this:
The Script runs once per day and log in, this ensures that things are ready before Outlook starts.
2 weeks ago
I didn't think so but I wasn't sure if triggering it from Self Service might run it AS the user.
Anyway, it worked for me without creating a package or any of that extra stuff though. I just used the original (https://github.com/pbowden-msft/OutlookFontPoke) but changed lines 125-127:
FONTNAME="$4"
FONTSIZE="$5"
FONTCOLOR="$6"
I did it on my user, which already had Outlook setup and everything, I just changed all the font preferences before running it. I just feel like I must be missing something, because I'm not that good of a script writer for it to be that easy of a fix.
2 weeks ago
Well I figured out why I didn't have to do all the extra stuff: Outlook was already setup and had preferences configured on my account. I had someone login to the computer with their account and the script failed because the registry file didn't exist.
Thursday
No matter what I do I can't seem to get this to work if set before an account has been added in Outlook. Should that work or is it expected it will be used post login?
yesterday
@Bretterson I run the policy on Macs which have MS Outlook already installed and with the Trigger Login. As far as I found out, it is only requires to have the Outlook App installed, it is not required to have Outlook already configured with an account.
yesterday - last edited yesterday
Hmmm. I still can't seem to get it working before an account has been added to Outlook. The script creates the file without issue, but the application doesn't take the changes. The file permissions match the ones that were on the the copy of MicrosoftRegistrationDB.reg I had prior to using the script (as in the file Outlook generated back when I added the user).
Are you using the App Store version of Outlook or a standard installer? I wonder if it behaves differently.
EDIT: I tried uninstalling Outlook and letting Jamf reinstall via Jamf App Installers rather than MAS, still no luck 😖
15 hours ago
@Bretterson we use the Office PKG Installer. To get my workflow to work, it is not required to have a Profile in Outlook.
In case Outlook is not installed I get the following log:
After installing Outlook the script shows an error:
Then I activated Outlook and created a Profile, the result in the Outlook Settings are like expected:
14 hours ago
Jamf App Installers looks to be using a PKG installer as well, so that probably isn't the issue.
I actually modified the script to download the TemplateDB.reg directly from GitHub and use parameters from a Jamf policy. All of that is working fine... other than the messages that the registry and registry path don't exist, I don't get any errors at all, regardless of whether I run it with or without Outlook installed. But for some reason Outlook doesn't process the changes unless I run it after an account has been added. Maybe I'll see what happens if I just run it locally. I don't want to give up but I'm low on ideas.
PS: You can delete line 163 from the script, it seems to be an errant character.
Posted on 09-15-2023 12:59 AM
works for me on monterey, but not on ventura.. anyone got that working on ventura?
Posted on 10-02-2023 09:23 AM
I did have more consistent success injecting the fonts in question to /Users/$userName/Library/Group\ Containers/UBF8T346G9.Office/FontCache/4/CloudFonts/. The fonts I am using are not a default font set though... Then I setup an EA and smart group to test for existence of those fonts before setting the default.