I have a database service running in a directory known as C:\meuBanco\exe\
and now I have developed an updater of this service, which performs the following steps:
exe
folder: rd /s /q %DIRSERV%\exe\
exe
The problem is in step 2, where you can not possibly delete the folder as it is in use.
But when the update is executed, it can delete the folder because it should not have any process locking the exe
folder.
So I ask: Is there a way to force removal of a directory in Windows even though it is in use?