Archive: Preserving file attributes?


Preserving file attributes?
Hi there

I am creating an installer for a project with _many_ files marked with the system attribute (1421 files to be exact). The installer just ignores the system attributes when I include files with File /r "C:\project\*.*".

Since I have this many files I really like to have some way to make makensis preserve file attributes instead of using SetFileAttribute 1421 times. What is the best way to accomplish this? Does any one have a patch to do this or have I missed an option?

Thanks a lot
Lars Munch


Well, you can use *.* with SetFileAtrributes too. :)


*.* is not good enough
Unfortunately this is no good enough to solve my problem easely. My files with the system attribute set are located in a lot of different directories and not all files in these directories should have the system attribute set.

Anyway, thx for the tip.

Regards
Lars Munch


How about if you make a program to write the script for you? I don't think it will be too difficult :)


Script...
I allready have a script that adds a lot of SetFileAttribute to the .nsi file. IMHO this is a hacky way of solving the problem.

Is there any reason why attributes are not preserved? To me it seems like a bug. For example, consider the command 'tar'. If this did not preserve file attributes you would be lost.

Regards
Lars Munch


Perhaps another parameter like /a could be used with the File command to preserve the file attributes. This would be a pretty convenient feature. All it would really do is to a SetFileAttributes with the actual attributes after the file command. Perhaps I will try to add this fix and post my results later.


File /a option
Adding a /a to File would be a very nice way of introducing this feature. I am looking forward to see a patch.

Thanks a lot
Lars Munch