Hi Kevin,
never had this by myself but first interesting thing would be to know which process is locking the file. You could download the Process Explorer and analyse the file via
Find > Find Handle or DLL.
In the "Handle or DLL substring:" text box, type the path to the file (e.g. "C:path ofile.txt") and click "Search".
All processes which access the file should be listed.
Did you also try to give the machine an IISRESET or/and a reboot before trying to install?
Kind regards,
Enrico
There's also a simpler way using the tasklist utility with /m.
/m > ModuleName ] : Specifies to show module information for each process. When a module is specified, all the processes using that module are shown. When a module is not specified, all the processes for all the modules are shown. Cannot be used with the /svc or the /v parameter.
See Tasklist | Microsoft Docs