LMC
18th February 2002 11:55 UTC
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
kichik
18th February 2002 13:40 UTC
Well, you can use *.* with SetFileAtrributes too. :)
LMC
18th February 2002 15:29 UTC
*.* 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
kichik
18th February 2002 15:46 UTC
How about if you make a program to write the script for you? I don't think it will be too difficult :)
LMC
18th February 2002 16:00 UTC
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
rainwater
19th February 2002 01:56 UTC
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.
LMC
20th February 2002 17:19 UTC
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