Half a year ago I put together a working msoffice2019 package which also works, except for one thing: When uninstalling, the "Microsoft Office" folder is always left in C: \ Program Files. If I try to install msoffice again, opsi fails. He recognizes the folder and thinks that it is already installed. If you delete the folder manually beforehand, everything works fine.
My first thought was to simply delete the folder beforehand with the command:
Code: Alles auswählen
delete -sf "c: \ Program Files \ Microsoft Office \"
I would like to have a query made for the said Microsoft Office folder after the uninstallation as well as before the installation and if it is empty, delete it.