Archive: Error removing main directory


Error removing main directory
I have installation going and testing removing. My uninstall removes everything but leaves the main directory which now is empty and I have no access. Says to check if drive is full (not), write protected or in use. I cannot go into the directory as get the same result. I get all the directories empty and removed, but the main directory is left. Part of my uninstall script is:

# Remove files
delete $INSTDIR\*.*
delete $INSTDIR\db\*.*
delete $INSTDIR\Messages\*.*
delete $INSTDIR\Sounds\*.*

rmDir $INSTDIR\db
rmDIR $INSTDIR\Messages
rmDIR $INSTDIR\Sounds
rmDIR $INSTDIR\Documents


# Remove the install directory
rmDir $INSTDIR

Any suggestions? Now I have an install directory left on the drive that I cannot do anything with.

Thanks


There's probably still some process running that has the directory locked. A common culprit I tend to forget is cmd.exe, with the directory in question opened.