From MSI to WiX, Part 2 - ARP support, by Alex Shevchuk
Following content is directly reprinted from From MSI to WiX, Part 2 - ARP support
Author: Alex Shevchuk
Adding Add/Remove Program (ARP) support
Subset of properties stored in the Property table defines the information operating system will show in Add/Remove Program Control Panel applet for the installed application.
Here is the list of ARP-related properties:
- ARPCOMMENTS
- ARPCONTACT
- ARPPRODUCTICON
- ARPHELPLINK
- ARPREADME
- ARPURLINFOABOUT
- ARPURLUPDATEINFO
- ARPHELPTELEPHONE
- ARPAUTHORIZEDCDFPREFIX
- ARPSIZE
- ARPINSTALLLOCATION
Some ARP properties will change the way how application can be updated:
Setting the ARPSYSTEMCOMPONENT property to 1 (actually, just having it in the Property table with any value) will hide the application from Add/Remove Programs.
Setting the ARPNOREMOVE property to 1 will hide or disable (on Windows 2000 and Windows XP) the Remove button in Add/Remove Programs.
Setting the ARPNOMODIFY property to 1 will disable the Modify (Change on Windows 2000) button in Add/Remove Programs.
Setting the ARPNOREPAIR property to 1 will disable the Repair button in Add/Remove Programs.
Because I don't want to clutter my main project file, I decided to put all ARP-related information in the separate include file (ControlPanel.wxi). Here is the content of this file:
<Include>
<Property Id="ARPCOMMENTS" Value="Acme Corporation Comments" />
<Property Id="ARPCONTACT" Value="Put your name in here" />
<Property Id="ARPPRODUCTICON" Value="MainIcon.ico" />
<Property Id="ARPHELPLINK" Value="Your help link" />
<Property Id="ARPREADME" Value="Your README link" />
<Property Id="ARPURLINFOABOUT" Value="Your 'About' information" />
<Property Id="ARPURLUPDATEINFO" Value="Your 'Update' URL" />
<Property Id="ARPHELPTELEPHONE" Value="URL where users can find your support phone number" />
<Property Id="ARPAUTHORIZEDCDFPREFIX" Value="URL of the update channel for the application" />
<Property Id="ARPSIZE" Value="3" /> <!--
<Property Id="ARPNOMODIFY" Value="0" />
<Property Id="ARPNOREPAIR" Value="0" />
<Property Id="ARPNOREMOVE" Value="0" />
<Property Id="ARPSYSTEMCOMPONENT" Value="0" />
--> <Icon Id="MainIcon.ico" SourceFile="MainIcon.ico" /> <!-- Set up ARPINSTALLLOCATION property -->
<CustomAction Id="SetARPINSTALLLOCATION" Property="ARPINSTALLLOCATION" Value="[INSTALLDIR]" /> <!-- Sequences -->
<InstallExecuteSequence>
<Custom Action="SetARPINSTALLLOCATION" After="InstallValidate"></Custom>
</InstallExecuteSequence>
</Include>
As you can see, in many cases, setting the value of the property is just simple declaration of the <Property> element, where Id attribute is set to the name of the property in the Property table and the Value attribute defines its value.
Situation is slightly more complicated when we set the product icon. We need to add the <Icon> element and make sure that Id attribute of the <Icon> element has the same value as the Value attribute of the <Property> element with the Id attribute of ARPPRODUCTICON. SourceFile attribute of the <Icon> element points to an actual icon file.
Even more complicated is setting the value of ARPINSTALLLOCATION property. Because installation directory can be changed by the user either through user interface or command line, we can be sure about it only after installation path will be validated by the installer (more details about this process when we will talk about standard and custom actions). To set the value of ARPINSTALLLOCATION property we need to create a record in the CustomAction table with the custom action which will set the value of ARPINSTALLLOCATION property to the value of INSTALLDIR property. We also need to schedule this custom action to run after the standard InstallValidate action.
Here is the updated Minimal.wxs file:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2003/01/wi"> <Product Id="{1EFFDCD2-4B4B-439E-8296-651795EE02D9}"
Name="Minimal Windows Installer Sample"
Language="1033"
Codepage="1252"
Version="1.0.0"
Manufacturer="Acme Corporation"
UpgradeCode="{15F9543C-1C8D-45D6-B587-86E65F914F20}"> <Package Id="{909A6CE7-2739-4522-92C2-03AD7D7EE4CD}"
Description="Minimal Windows Installer Sample"
Comments="This installer database contains the logic and data required to install Minimal Windows Installer Sample."
InstallerVersion="200"
Languages="1033"
SummaryCodepage="1252"
Platforms="Intel"
ReadOnly="no"
Compressed="yes"
AdminImage="no"
Keywords="Installer"
ShortNames ="no"
Manufacturer="Acme Corporation" /> <?include ControlPanel.wxi ?> <Media Id="1" /> <Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLDIR" Name="Minimal" LongName="MinimalInstallation"> <Component Id="Component1" Guid="{A77C5B06-132D-4884-8E17-EA10A83C812D}">
<CreateFolder />
</Component> </Directory>
</Directory>
</Directory> <Feature Id="Feature1"
Title="Feature1 title"
Description="Feature1 description"
Level="1"
ConfigurableDirectory="INSTALLDIR" > <ComponentRef Id="Component1" /> </Feature>
</Product>
</Wix>
Install it and take a look at the ARP properties for our package.
Whats next
Next time we'll take a look at the application search and launch conditions.
From MSI to WiX, Part 2 - ARP support, by Alex Shevchuk的更多相关文章
- From MSI to WiX, Part 1 - Required properties, by Alex Shevchuk
Following content is directly reprinted from From MSI to WiX, Part 1 - Required properties Author: A ...
- From MSI to WiX, Part 8 - Major Upgrade, by Alex Shevchuk
Following content is reprinted from here, please go to the original website for more information. Au ...
- From MSI to WiX, Part 4 - Features and Components by Alex Shevchuk
Following content is directly reprinted from : http://blogs.technet.com/b/alexshev/archive/2008/08/2 ...
- WIX Custom Action (immediate, deffered, rollback)
Following content is directly reprinted from From MSI to WiX, Part 19 - The Art of Custom Action, Pa ...
- 【转】busybox分析——arp设置ARP缓存表中的mac地址
[转]busybox分析——arp设置ARP缓存表中的mac地址 转自:http://blog.chinaunix.net/uid-26009923-id-5098083.html 1. 将arp缓存 ...
- Toad for Oracle 12.1下载地址
32 位版: http://us-downloads.quest.com/Repository/support.quest.com/Toad for Oracle/12.1/Software/Toad ...
- Event filter with query "SELECT * FROM __InstanceModi
Event filter with query "SELECT * FROM __InstanceModi 问题描述: Details -Event filter with quer ...
- Windows Server 2008 R2 报错事件ID:10之WMI报错
问题描述: Details -Event filter with query "SELECT * FROM __InstanceModificationEvent WITHIN 60 WHE ...
- Win7系统出现提示: “Windows已遇到关键问题,将在一分钟后自动重新启动。”
1. 若用户在使用Win7系统时,遇到上述系统故障,建议重启电脑.等电脑开机自检一过,马上按键盘上的F8键,选择进入安全模式.在安全模式下,进行系统还原.其他的解决方法见下. 1.或者,在安全模式下, ...
随机推荐
- PowerDesigner 物理数据模型(PDM)
PowerDesigner 物理数据模型(PDM) 说明 数据库脚本sqldatabasegeneration存储 目录(?)[+] 一. PDM 介绍 物理数据模型(Physical ...
- [置顶] 用Wireshark保存RTP的负载码流
这段时间工作太忙,有些日子没写文章了,今天准备了一篇Wireshark工具的一个小功能,在验证码流的时候非常好用,闲话不说,直接说步骤: 1.打开Wireshark抓取流媒体码流,然后用RTP过滤: ...
- UVa 131 - The Psychic Poker Player
题目:手里有五张牌,桌上有一堆牌(五张).你能够弃掉手中的k张牌,然后从牌堆中取最上面的k个. 比較规则例如以下:(按优先级排序) 1.straight-flush:同花顺.牌面为T(10) - A, ...
- materialish-progress
https://github.com/pnikosis/materialish-progress materialish-progress-master.zip
- There is no Action mapped for action name XXX. - [unknown location]
今天被这个问题费了不少时间,原因是缺少了 struts2-json-plugin-2.3.1.2.jar 包 当然,有时候也可能是缺少其他包, 把这个包添加到lib文件夹后还要刷新,clean一下,因 ...
- Android Sqlite 导入CSV文件 .
http://blog.csdn.net/johnnycode/article/details/7413111 今天遇到 Oracle 导出的12万条CSV格式数据导入 Android Sqlite ...
- 【面试题】如何让C语言自动发现泄漏的内存
1. 题目 改造malloc和free函数,使C语言能自动发现泄漏的内存,在程序退出时打印中遗漏的内存地址和大小. 2. 思路 用一个链表来记录已经分配的内存地址.在malloc时,把分配的内存地址和 ...
- springMVC项目在jboss7中配置应用自己的log4j--转载
原文地址:http://www.xuebuyuan.com/1954635.html Jboss7默认采用容器自己的log4j module,应用自己配置的log4j不起作用,需要应用做一些设置: 以 ...
- 【转】ubuntu修改IP地址和网关的方法
一.使用命令设置Ubuntu IP地址 1.修改配置文件blacklist.conf禁用IPV6 sudo vi /etc/modprobe.d/blacklist.conf 表示用vi编辑器(也可以 ...
- apply方法别有他用!
首先是apply()一个很强大的功能——能将一个数组默认转化为参数列表!!! 应用: 1.求出一个数组中的最大值 var arr= [1, 3, 3, 6]; var max =Math.max.ap ...