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 \"
For a reason inexplicable to me, opsi does not recognize this command and of course does not execute it. Maybe I entered this in the wrong place in the script. Other variations of it didn't work either. My second approach was to delete the folder via the uninstall.xml, which didn't work either. Any idea?
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.