Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Writing your first WiX Project

As, you may be aware that Visual Studio Installer for MSI/EXE has been discontinued from TFS 2012 and there are two ways you can create setup now, one is using Install Shield and another is WiX which is itself developed as open source by Microsoft.

Lets have look at WiX project by creating our First project.

1) Download WiX toolset from http://wixtoolset.org/ and install it.
2) Add path of WiX installer bin to PATH  environment variable. As, we might need to do lot of command line things.
3) Create New Setup WiX Project from Visual Studio 2012. WiX is also compatible with 2010. However, first thing you will notice is that it is all XML format and not so user friendly and hence it needs to lots of learning to master it.
4) Rename Product.wxs as per your suitable name for creating MSI. Can also change Product ID name an feature ID name suitable to you.
5) Add below under Component Group -

<Component Id='MainExecutable' Guid='YOURGUID-cd99-462d-ab8b-d7f8eed94a89'>
        <File Id='testEXE' Name='test.exe' DiskId='1' Source='C:\sourcepathofEXE' KeyPath='yes' />
</Component>

or alternatively use below to add like below-
<File Id="MainExecutable" Name="$(var.MyProject.TargetFileName)" Source="$(var.MyProject.TargetPath)" DiskId="1" />

6) Run "candle.exe yourproject.wxs". It will generate wixobj file with same name
7) Run "light.exe yourproject.wixobj". It will generate desired MSI. Run MSI to install files in Program Files folder.

For more tutorial on WiX,  refer http://wix.tramontana.co.hu/
WiX manual located at http://wix.sourceforge.net/manual-wix3/main.htm


This post first appeared on Your Guide To Technology, please read the originial post: here

Share the post

Writing your first WiX Project

×

Subscribe to Your Guide To Technology

Get updates delivered right to your inbox!

Thank you for your subscription

×