开发者

Copy files from Setup location to installation dir

I am working on my Wix project and have 2 questions:

1) How can I copy file from the same location as my .msi is to the destination folder specified during installation. This file is not part of .msi package but a customized file that needs to be copied after the installer copies the main code files.

2) If this customized file is not available at the location where .msi file is, then I need to show up a OpenFile Dialog so that user can specify the location of this file.

In short, by default the installer should look for the customized file at the same location where the installer is and if the file is not available then show OpenFile Dialog.

Any suggestion or sample code snippet woul开发者_StackOverflow中文版d be very helpful as I am bit new to WIX world.

Thanks for your time.


Ok, first thing you should find out if the file is there. Use DirectorySearch/FileSearch elements for this.

Next, based on the file search result (it will end up in a certain property) schedule and condition a new dialog. You can find how to customize your dialog UI sequence here.

And finally, use CopyFile element to do the copy work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜