OLD | NEW |
| (Empty) |
1 <?xml version='1.0'?> | |
2 <Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'> | |
3 <?define UpgradeCode='96E1371A-A5A1-45cc-8E67-2EF6ABDE054D' ?> | |
4 | |
5 <Product Id='$(var.FooProductGuid)' Name='!!! Test Foo' Language='1033' | |
6 Version='$(var.FooVersion)' Manufacturer='Google, Inc.' | |
7 UpgradeCode='$(var.UpgradeCode)'> | |
8 | |
9 <!-- | |
10 This file has all the values necessary to report success or failure. | |
11 It can also be made to report neither (for testing failure cases). | |
12 Note that the way failure is generated is NOT how it should be done for | |
13 real installers. See FooNotifyFailed for details. | |
14 | |
15 This file supports several scenarios. Enabling each one is described bel
ow. | |
16 * Success (default) | |
17 - Do not specify any properties | |
18 * Success and tell Omaha to launch Foo | |
19 - Specify REGISTER_LAUNCH_COMMAND property (any value) | |
20 * Failure | |
21 - Specify the NOTIFY_FAILURE property (any value) | |
22 * No result reported (Omaha will use exit code) | |
23 - Specify the DO_NOT_NOTIFY_SUCCESS property (any value) | |
24 | |
25 The registry value propbar can be written. | |
26 - Specify the PROPBAR property with value 7. | |
27 | |
28 This file also supports failing product condtions. In this case, no | |
29 success or failure value is written, as would happen with real | |
30 installers. | |
31 - Specify the FAIL_PRODUCT_CONDITION property (any value) | |
32 --> | |
33 | |
34 <Package Id='*' | |
35 Description='Test Foo' | |
36 Comments='Copyright 2007-2010 Google Inc.' | |
37 Manufacturer='Google Inc.' | |
38 InstallerVersion='200' | |
39 Compressed='yes' /> | |
40 | |
41 <Upgrade Id='$(var.UpgradeCode)'> | |
42 <UpgradeVersion Property='UPGRADING' | |
43 OnlyDetect='no' | |
44 Minimum='0.0.0.0' IncludeMinimum='yes' | |
45 Maximum='$(var.FooVersion)' IncludeMaximum='no' /> | |
46 <UpgradeVersion Property='NEWERVERSIONDETECTED' | |
47 OnlyDetect='yes' | |
48 Minimum='$(var.FooVersion)' IncludeMinimum='yes' /> | |
49 </Upgrade> | |
50 | |
51 <!-- Omaha id --> | |
52 <Property Id='UPDATE2_ID'>{D6B08267-B440-4c85-9F79-E195E80D9937}</Proper
ty> | |
53 | |
54 <InstallExecuteSequence> | |
55 <!-- We can either put RemoveExistingProducts after InstallValidate | |
56 or InstallFinalize. | |
57 1) After InstallValidate | |
58 * The old verion goes away anyway no matter if the new version | |
59 has been installed successfully. | |
60 2) After InstallFinalize | |
61 * Might leave both old version and new version in the system if | |
62 MSI fails to uninstall the old version. | |
63 * Will remove files and registry entries, including Omaha | |
64 registration, for the new version. Thus, we cannot use this | |
65 option without adding complexity. Reference: | |
66 http://blogs.msdn.com/astebner/archive/2007/09/06/4798334.aspx | |
67 --> | |
68 <RemoveExistingProducts After='InstallValidate'>UPGRADING</RemoveExist
ingProducts> | |
69 <Custom Action="NewerVersionError" After="FindRelatedProducts">NEWERVE
RSIONDETECTED</Custom> | |
70 </InstallExecuteSequence> | |
71 | |
72 <CustomAction Id="NewerVersionError" Error="4000"/> | |
73 | |
74 <Property Id="ALLUSERS"><![CDATA[1]]></Property> | |
75 | |
76 <Media Id='1' Cabinet='product.cab' EmbedCab='yes' CompressionLevel='hig
h' /> | |
77 | |
78 <Directory Id='TARGETDIR' Name='SourceDir'> | |
79 <Directory Id='ProgramFilesFolder'> | |
80 <Directory Id='FooDir' Name='Test Foo'> | |
81 <Directory Id='FooVersion' Name='$(var.FooVersion)'> | |
82 <Component Id='FooFiles' Guid='$(var.FooComponentGuid)'> | |
83 <File Id='test_foo' Vital='yes' Name='test_foo.exe' | |
84 DiskId='1' Source="$(var.FooExePath)"/> | |
85 </Component> | |
86 </Directory> | |
87 <Component Id='FooReg' Guid='$(var.FooComponentGuidRegistry)'> | |
88 <RegistryValue Root='HKLM' | |
89 Key='Software\Google\Update\Clients\[UPDATE2_ID]' | |
90 Name='name' Value="test_foo" | |
91 Action='write' Type='string' /> | |
92 <RegistryValue Root='HKLM' | |
93 Key='Software\Google\Update\Clients\[UPDATE2_ID]' | |
94 Name='pv' Value="$(var.FooVersion)" | |
95 Action='write' Type='string' /> | |
96 </Component> | |
97 <Component Id='FooNotifySuccess' Guid='$(var.FooComponentGuidNotif
ySuccess)'> | |
98 <!-- Controls whether to notify success. --> | |
99 <Condition>NOT NOTIFY_FAILURE AND NOT DO_NOT_NOTIFY_SUCCESS</Con
dition> | |
100 <RegistryValue Root='HKLM' | |
101 Key='Software\Google\Update\ClientState\[UPDATE2_ID]' | |
102 Name='InstallerResult' Value="0" | |
103 Action='write' Type='integer' /> | |
104 <RegistryValue Root='HKLM' | |
105 Key='Software\Google\Update\ClientState\[UPDATE2_ID]' | |
106 Name='InstallerError' Value="1234" | |
107 Action='write' Type='integer' /> | |
108 </Component> | |
109 <Component Id='FooRegisterLaunchCommand' | |
110 Guid='$(var.FooComponentRegisterLaunchCommand)'> | |
111 <!-- Controls whether to notify success. --> | |
112 <Condition>REGISTER_LAUNCH_COMMAND AND NOT DO_NOT_NOTIFY_SUCCESS
</Condition> | |
113 <RegistryValue Root='HKLM' | |
114 Key='Software\Google\Update\ClientState\[UPDATE2_ID]' | |
115 Name='InstallerSuccessLaunchCmdLine' Value=""[#test_foo]&
quot;" | |
116 Action='write' Type='string' /> | |
117 </Component> | |
118 <!-- | |
119 Writes the registry entries that indicate failure. | |
120 This method of writing the registry for failures is only useful | |
121 for simple testing. | |
122 Real installers will NOT report failure in this way. | |
123 They would report the failure in custom action code. | |
124 The reason is that this component will only get run and the | |
125 side effects left in place if success succeeds. | |
126 --> | |
127 <Component Id='FooNotifyFailed' Guid='$(var.FooComponentGuidNotify
Failed)'> | |
128 <!-- Controls whether to notify failure. --> | |
129 <Condition>NOTIFY_FAILURE</Condition> | |
130 <RegistryValue Root='HKLM' | |
131 Key='Software\Google\Update\ClientState\[UPDATE2_ID]' | |
132 Name='InstallerResult' Value="1" | |
133 Action='write' Type='integer' /> | |
134 <RegistryValue Root='HKLM' | |
135 Key='Software\Google\Update\ClientState\[UPDATE2_ID]' | |
136 Name='InstallerError' Value="99" | |
137 Action='write' Type='integer' /> | |
138 <RegistryValue Root='HKLM' | |
139 Key='Software\Google\Update\ClientState\[UPDATE2_ID]' | |
140 Name='InstallerResultUIString' Value="<b>Test Foo</b&
gt; installation failed because it wanted to! For more information visit <a=h
ttp://labs.google.com/>http://labs.google.com/</a>." | |
141 Action='write' Type='string' /> | |
142 </Component> | |
143 <Component Id='FooPropBar' Guid='$(var.FooComponentGuidPropertyBar
)'> | |
144 <!-- Controls whether to write propbar. --> | |
145 <Condition>PROPBAR=7</Condition> | |
146 <RegistryValue Root='HKLM' | |
147 Key='Software\Google\Update\ClientState\[UPDATE2_ID]' | |
148 Name='propbar' Value="7" | |
149 Action='write' Type='integer' /> | |
150 </Component> | |
151 </Directory> | |
152 </Directory> | |
153 </Directory> | |
154 | |
155 <Feature Id='Foo' Title='Foo' Level='1'> | |
156 <ComponentRef Id='FooFiles' /> | |
157 <ComponentRef Id='FooReg' /> | |
158 <ComponentRef Id='FooNotifySuccess' /> | |
159 <ComponentRef Id='FooRegisterLaunchCommand' /> | |
160 <ComponentRef Id='FooNotifyFailed' /> | |
161 <ComponentRef Id='FooPropBar' /> | |
162 <?if $(var.IsEnterprise) = 1 ?> | |
163 <ComponentRef Id='ComponentGoogleUpdate' /> | |
164 <?endif?> | |
165 </Feature> | |
166 <Property Id="UILevel"><![CDATA[1]]></Property> | |
167 | |
168 <Condition Message='Test Foo runs only on Windows 2000 Service Pack 3 and
later.'> | |
169 (VersionNT = 500 AND ServicePackLevel = 3) OR VersionNT >= 501 | |
170 </Condition> | |
171 | |
172 <Condition Message='The FAIL_PRODUCT_CONDITION property was specified.'> | |
173 NOT FAIL_PRODUCT_CONDITION | |
174 </Condition> | |
175 | |
176 <UI> | |
177 <Error Id="4000">A newer version of this product is already installed.</E
rror> | |
178 </UI> | |
179 | |
180 </Product> | |
181 </Wix> | |
182 | |
OLD | NEW |