Archive: How to copy the folders using 'File' in installer script?


How to copy the folders using 'File' in installer script?
For example:

  1. If my script exists in a folder "C:\code\installer\"
  2. And my $INSTDIR is setto "C:\sampleProject".
  3. and my sample project have multiple features...each feature needst to copy in to diffrent folder. ex:- "C:\sampleProject\fea1", "C:\sampleProject\fea1\", "C:\sampleProject\fea2\"...etc.,
  4. And the source for all these features are needs to take from "C:\code\fea1", "C:\code\fea2"...etc.,
  5. is this possiable to copy using 'File'? if yes, how? if no, is there any otherway to do this.

Thanks.

SetOutPath $INSTDIR
File /r ..\fea1
File /r ..\fea2
...

You could also do...
SetOutPath $INSTDIR
File /x installer /r ..
...but note /x is recursive. Other files/folders called "installer" will be ignored.

Stu