Skip to main content

Hello,



Im trying to remove the Office 2011 data folder for users. I have not had success wit hit.



I tried to create a policy via composer as a DMG to uninstall and no remove scripts are working. Its the folder under Documents/Microsoft User Data

This should be pretty simple to do with a script. Are you looking to remove the directory from just a single user, like the logged in or main user of the machine, or just any of them?
I wouldn't even try doing this with a DMG set to uninstall. That isn't going to work very well in this case.


~duplicate~


Depending on how you're trying to do it... You could do this



loggedInUser=`/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'`

rm -rf /Users/$loggedInUser/Documents/Microsoft User Data/path/


Regards,
TJ


Try :



rm -rf /Users/$3/Documents/Microsoft User Data/       - this will delete the Microsoft user Data folder


rm -rf /Users/$3/Documents/Microsoft User Data/* -this will delete the items inside Microsoft Data Folder


Basically,just replace the loggedon username with $3


@tthurman this worked great! Thank you.


Reply