Skip to main content
Question

Delete PowerPoint Template File

  • May 4, 2018
  • 2 replies
  • 6 views

Forum|alt.badge.img+3

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

Forum|alt.badge.img+14
  • Valued Contributor
  • May 4, 2018

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.


Forum|alt.badge.img+1
  • New Contributor
  • September 10, 2020

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.