cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
deepakzworld
Level 4

Not able to delete directory with read-only files

Hi,
I am trying to delete a directory using InstallScript during 'Modify' but this directory contains read-only files. As such, DeleteDir is failing on it.
Is there a way to forcibly delete this directory?
One way could be to loop over all the files in this directory, change their attribute to normal and then delete the directory. But I am not getting how to loop over these files. Can anyone please shed some light on this?

Any help is greatly appreciated 🙂

Thanks
Labels (1)
0 Kudos
(1) Reply
timstspry
Level 7

Hello, I had to write a VBScript to do this and create a VB Custom Action to fire it at the right time. Not sure of an "easy" way to do it in pure InstallScript.

Hope this helps!

Tim
0 Kudos