Skip to content

Commit e64874e

Browse files
Fixes for installer upgrades
1 parent f32521c commit e64874e

File tree

2 files changed

+32
-81
lines changed

2 files changed

+32
-81
lines changed
1.86 KB
Binary file not shown.

IntelPresentMon/PMInstaller/PresentMon.wxs

Lines changed: 32 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<Package InstallerVersion="500" Compressed="yes" InstallScope="perMachine" Platform="x64"/>
1212

1313
<MajorUpgrade
14-
Schedule="afterInstallInitialize"
14+
Schedule="afterInstallValidate"
1515
AllowDowngrades="no"
1616
DowngradeErrorMessage="!(loc.product_downgrade_error_message)"/>
1717

@@ -45,8 +45,6 @@
4545
<ComponentGroupRef Id="pm_app_web_css" />
4646
<ComponentGroupRef Id="pm_app_web_fonts" />
4747
<ComponentGroupRef Id="pm_app_web_js" />
48-
<ComponentGroupRef Id="shortcuts" />
49-
<ComponentGroupRef Id="desktop_shortcut" />
5048
</Feature>
5149
<Feature
5250
Id="presentmon_provider_install"
@@ -89,32 +87,6 @@
8987
<UIRef Id="WixUI_ErrorProgressText" />
9088

9189
<WixVariable Id="WixUILicenseRtf" Value="license.rtf" />
92-
93-
<!--
94-
RemoveFolderEx requires that we pull the folder information from the registry.
95-
Obtain the main application folder name
96-
-->
97-
<Property
98-
Id="APPLICATIONFOLDER">
99-
<RegistrySearch
100-
Id="MainApplicationFolderRegSearch"
101-
Root="HKCU"
102-
Key="Software\Intel\PresentMon"
103-
Name="PresentMonInstallFolder"
104-
Type="raw" />
105-
</Property>
106-
<!--
107-
As well as the local app date folder
108-
-->
109-
<Property
110-
Id="LOCALAPPDATAFOLDER">
111-
<RegistrySearch
112-
Id="LocalAppDataFolderSearch"
113-
Root="HKCU"
114-
Key="Software\Intel\PresentMon"
115-
Name="LocalAppDataPresentMonFolder"
116-
Type="raw" />
117-
</Property>
11890
</Product>
11991

12092
<Fragment>
@@ -169,9 +141,7 @@
169141
</Directory>
170142
<Directory
171143
Id="ProgramMenuFolder">
172-
<Directory
173-
Id="shortcuts_folder"
174-
Name="PresentMon"/>
144+
<Directory Id="PM_ProgramMenuFolder" Name="Intel PresentMon" />
175145
</Directory>
176146
<Directory
177147
Id="DesktopFolder"
@@ -297,6 +267,36 @@
297267
KeyPath="yes">
298268
</File>
299269
</Component>
270+
<Component Id="pm_app_shortcuts" Guid="7222FDA2-E341-43F8-836E-F62044C62595">
271+
<!-- Desktop shortcut (per-user) -->
272+
<Shortcut Id="sc_presentmon_desktop"
273+
Directory="DesktopFolder"
274+
Name="Intel PresentMon"
275+
Advertise="no"
276+
Target="[pm_app_folder]PresentMon.exe"
277+
WorkingDirectory="pm_app_folder" />
278+
279+
<!-- Start Menu shortcut (per-user, into our subfolder) -->
280+
<Shortcut Id="sc_presentmon_startmenu"
281+
Directory="PM_ProgramMenuFolder"
282+
Name="Intel PresentMon"
283+
Advertise="no"
284+
Target="[pm_app_folder]PresentMon.exe"
285+
WorkingDirectory="pm_app_folder" />
286+
287+
<!-- HKCU registry value = KeyPath (per-user component) -->
288+
<RegistryValue Root="HKCU"
289+
Key="Software\Intel\PresentMon"
290+
Name="Installed"
291+
Type="integer"
292+
Value="1"
293+
KeyPath="yes" />
294+
295+
<!-- Tidy the (empty) Start Menu subfolder on uninstall -->
296+
<RemoveFolder Id="RemovePMProgramMenuFolder"
297+
Directory="PM_ProgramMenuFolder"
298+
On="uninstall" />
299+
</Component>
300300
<Component
301301
Id="pm_app_kern_proc_exe"
302302
Guid="7E4A9C50-97C5-4BFE-B4D0-0E3B2FA5C3F7">
@@ -577,54 +577,5 @@
577577
</File>
578578
</Component>
579579
</ComponentGroup>
580-
<ComponentGroup
581-
Id="shortcuts"
582-
Directory="shortcuts_folder">
583-
<Component
584-
Id="present_mon_shortcuts"
585-
Guid="3F7502E9-BE4B-47A2-9270-C653816A7112">
586-
<Shortcut
587-
Id="present_mon_start_menu_shortcut"
588-
Name="Intel PresentMon"
589-
Target="[pm_app_folder]PresentMon.exe"
590-
WorkingDirectory="pm_app_folder"/>
591-
<Shortcut
592-
Id="uninstall_shortcut"
593-
Name="Uninstall Intel PresentMon"
594-
Target="[System64Folder]msiexec.exe"
595-
Arguments="/x [ProductCode]"/>
596-
<RemoveFolder
597-
Id="remove_sample_client_executable_shortcut"
598-
On="uninstall"/>
599-
<RegistryValue
600-
Root="HKCU"
601-
Key="Software\Intel\PresentMon"
602-
Name="installed"
603-
Type="integer"
604-
Value="1"
605-
KeyPath="yes"/>
606-
</Component>
607-
</ComponentGroup>
608-
<ComponentGroup
609-
Id="desktop_shortcut"
610-
Directory="DesktopFolder">
611-
<Component
612-
Id="present_mon_desktop_shortcut"
613-
Guid="8FD09995-32BF-42D3-B5E2-57F5D2592D67">
614-
<Shortcut Id="present_mon_desktop_shortcut"
615-
Name="Intel PresentMon"
616-
Description="Launch Intel PresentMon"
617-
Target="[pm_app_folder]PresentMon.exe"
618-
WorkingDirectory="pm_app_folder">
619-
</Shortcut>
620-
<RegistryValue Root="HKCU"
621-
Key="Software\Intel\PresentMon"
622-
Name="DesktopShortcut"
623-
Type="integer"
624-
Value="1"
625-
KeyPath="yes">
626-
</RegistryValue>
627-
</Component>
628-
</ComponentGroup>
629580
</Fragment>
630581
</Wix>

0 commit comments

Comments
 (0)