Loading
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

  • 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
    Expand Post

Loading
Not able to delete directory with read-only files