IntroductionThe Windows Installer XML (WiX) is a toolset that builds Windows installation packages from XML source code. The toolset supports a command line environment that developers may integrate into their build processes to build MSI and MSM setup packages.AdvantagesThe WiX toolset provides the following advantages over other popular Windows Installer developer tools:
DownloadTo download WIX visit the link http://wixtoolset.org/ . After Installing (WIX) we have Wix Template In Vs2012To create a setup of an application we need to do the following:
Step 1: Add new WPF ApplicationUse "New" -> "Project..." ->"WPF Application project".It will look like this:Step 2 : Add Windows Installer Project Now it will look like:Step 3: Add a reference of the WPF ApplicationRight-click on the reference of the of the WIX project and add the WPF Project.Step 4: Configure the installation of the XML file (*.WXS)While you see the *.wxs file it has some predefined code written in XML. It has various properties and tags for these things, you need to the following:
It will explain all the properties in detail and you can get a practical example from here.Note: You must provide the new GUID where I have "Your-Guid-". You can do that very easily from Visual Studio.Click on "Tools" and click on "Create GUID"; it creates a new GUID every time.Use the new GUID by just clicking on the "Copy" button and paste it wherever you want the GUID.Add WPF project to the *.WXS FileWe need to give a reference of the WPF Application project in the *.WXS file. So that we can use the variables of the WIX you can see this on the link and in: http://wix.sourceforge.net/manual-wix3/votive_project_references.htm. I have done that like this:Add Cab1.cab File inside the PackageWhen you build you WIX project it will create a Cab1.cab file and a *.setup so if we need only one single file for the setup add that time we need to add that file to our setup file. Create Folder in Program Files FoldersCreate Folder in Program Menu for Program menu shortcutIn the start menu we can create a folder and inside the folder we can provide our application. To do that we need to do 3 steps.Step 1: Create Program Menu FolderIt will create a folder named "My System Pvt Ltd " in the Start Menu.Step 2: Add shortcut of our application with image You can use any *.ico file ,add that file to the WIX project.Step 3: Add shortcut component to FeaturesWe are telling you that you need to add this shortcut to the installer.Create shortcut on DesktopIf you need to add a shortcut to the Desktop then we need to use the same steps as we did for creating the shortcut in the Startup Menu or Program Menu. Step 1: Create Desktop FolderStep 2: Add shortcut of our application with image Step 3: Add shortcut component to Features Add the Application to the Startup Folder (When the user is logged into the application it starts automatically)If you want to put your application in the Startup folder then you can do that as you have done for the Program Menu shortcut and Desktop shortcut.Step 1: Create Startup FolderStep 2: Add shortcut of our application with an image Step 3: Add shortcut component to Features ConclusionWe can create the setup of application using the Windows Installer XML very easily. We can get all the functionality of the Windows installation using WIX.If this article helps you then please tell me by you valuable comments.
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: