Delete PowerPoint Template File

benk234
New Contributor

Our Mac's have a PowerPoint template file deployed to them, located in /Users/ACCOUNTNAME/Library/Group Containers/UBF8T346G9.Office/User Content/Templates. I'm trying to script deleting this file, and not having much luck. Any thoughts! Thanks!

2 REPLIES 2

tthurman
Contributor III

On my device my User Content Folder is actually User Content.localized

and also Templates -> Templates.localized

Perhaps that's it?

Regards,
TJ

EDIT: While Finder says it's "Templates" and/or User Content it looks like it has an extension attached - which is kinda weird.

jseckler-adi
New Contributor II

This worked for me. Hopefully it can help others as well.

1) Have the script run before the DMG runs

!/bin/bash

loggedInUser=$( echo "show State:/Users/ConsoleUser" | scutil | awk '/Name :/ && ! /loginwindow/ { print $3 }' )
sudo rm -r -f "/Users/$loggedInUser/Library/Group Containers/UBF8T346G9.Office/User Content.localized/Templates.localized"

2) Run the DMG that unpacks to FUT and FEU.

*Set templates folder to everyone access with read/write/execute within composer.