Thứ Hai, 23 tháng 11, 2015

Creating a Simple Setup with WiX toolset

In this post, I follow this link: http://wixtoolset.org/documentation/manual/v3/votive/authoring_first_votive_project.html

I. Step 1: Create the C# Windows Form Application

I've got a Windows Form application, this is AutoClick_FirstBlood application. This application show as image below:

AutoClick_FirstBlood project

II. Step 2: Create installer for the application

1. Right click on the Solution 'AutoClick_FirstBlood', then click Add, then click New Project.




2. Choose the Windows Installer XML node in the Project types tree, then select Setup Project. Name the project "AutoClick_FirstBlood_Installer" and press OK.




3. In the AutoClick_FirstBlood_Installer project, right click on the References node and choose Add Reference...




4. Navigate to the Projects tab, click on the AutoClick_FirstBlood project, and click Add button, and then press OK.



5. In the Product.wxs file, find the comment that says:
<!-- <Component Id="ProductComponent"> -->
<!-- TODO: Insert files, registry keys, and other resources here. -->
<!-- </Component> -->
Delete that lines and replace it with the following lines of code:
<Component Id="ProductComponent">
<File Source="$(var.AutoClick_FirstBlood.TargetPath)" />
</Component>
Find the line of code that contains:
Manufacturer=""
In the quotes, type your name or your company name. Here, I type NhoLD (^.^)
Manufacturer="NhoLD"


6. Build the WiX project.


That's it. Now you have a working installer that installs and uninstalls the application.

Previous     Next

Không có nhận xét nào:

Đăng nhận xét