Empty folder cannot be deleted

MaxMustermann
Beiträge: 3
Registriert: 13 Aug 2020, 10:13

Empty folder cannot be deleted

Beitragvon MaxMustermann » 20 Aug 2020, 11:58

Hello everybody,

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.

Benutzeravatar
SisterOfMercy
Beiträge: 1196
Registriert: 22 Jun 2012, 19:18

Re: Empty folder cannot be deleted

Beitragvon SisterOfMercy » 22 Aug 2020, 20:00

Are you calling this section with the 64 bit parameter?

Code: Alles auswählen

Files_install_64 /64Bit

[Files_install_64]
delete -sf "%ProgramFiles64Dir%\Microsoft Office\"
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!