Skip to content
⌘ NSIS Forum Archive

Hot to overwrite a file, that is readonly ??

3 posts

stp#

Hot to overwrite a file, that is readonly ??

I must install a new File.
But the existing file is readonly.
How can i overwrite the existing file
or
reset the readonly - Attribut of the existing file ??

The syntax for setting a attribut is SetFileAttributes xx READONLY.
But how can i reset a attribut of a existing file ??

Thanks
Peter
JaqDraco#
If you use SetFileAttributes filename NORMAL all attributes are reseted

but you have to know the filename. Wildcards are not supported.
TomThumbKOP#
Or, if you don't mind a cheesey solution, you can ExecWait an Attrib -r *.blah then you can use wildcards. 😁