Archive: File Write Protection


File Write Protection
Well I've searched the forums, but I found nothing - maybe this question is nevertheless well known:

I've made a SetupCD but my Problem is, that the Files musn't be writeprotected after the installation, after copying from a CD (which is always write protected) I want to change this value of the Files properties

but I don't know how

I've already searched the Helpfile, but I couldn't find something about this Topic

I hope anyone knows what to do

thanks in advance


SetFileAttributes is the command you are looking for.

If you use the parameter NORMAL than the read-only status is removed. But unfortunately this command doesn't supports wildcards


Ok, I'll specify my problem:

I copy the Files of my Setup with CopyFiles because the Files are changed often and I don't want to recompile the Setup every few days. Because I have the Files on the Setup CD they are write-protected (don't know if this is the right word), but the Installer has to write a few lines in a file which is copied at the beginning.

So I need a Info how to change the write-protection-property to false

any Ideas?

EDIT:

oh thats what we call timing

whats a wildcard? :igor:


So I need a Info how to change the write-protection-property to false

any Ideas?
You can't do that, and probably $CDBURN_AREA can be used to store files to write at one time after in a CD-R, CD-RW, DVD-R or DVD-RW.

whats a wildcard?
* - A mask for all names with any characters long.
? - A mask for all names with 1 character long. (more ?'s, more characters...).

*.* - Means all folders and files.
*. - Means all folders or files with no extention at the end.

thanks for the info about the word Wildcard I never heard that word before

and about the read only mode - I don't wan't to use the properties of the files on the CD, I copy the files to the Instdir and change the properties then

thanks for your advices


CopyFiles $EXEDIR\Test.file $INSTDIR

copies the file to the $INSTDIR

SetFileAttributes $INSTDIR\test.file NORMAL

this removes the READONLY Status

This Way the Test.file is copied to $INSTDIR and isn't read-only anymore

But as i've written previously you have to use the command SetFileAttributes for every fiel you want to copy (No Wildcard Support)


It works :D
Thanks