This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Not able to delete directory with read-only files
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 23, 2009
03:56 PM
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
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
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Dec 26, 2009
01:31 AM
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
Hope this helps!
Tim