Advertise shortcuts

* Change shortcut to advertised

Note that I had to remove the ability to not install a
Start Menu shortcut, as advertised shortcuts must always
be installed.

Also note that I had to change the "Core" feature to always
be installed (disabling Install-on-Demand) as having that
turned on broke the Scheduled Task installer.

* Disable ARPNOMODIFY
This commit is contained in:
William Kent 2019-09-09 12:19:17 -04:00 committed by Enrico Giordani
parent 21bf5b11d7
commit 12cd7bb49f
3 changed files with 19 additions and 33 deletions

View File

@ -21,9 +21,8 @@
<Control Id="FolderLabel" Type="Text" X="20" Y="60" Width="290" Height="30" NoPrefix="yes" Text="!(loc.InstallDirDlgFolderLabel)" />
<Control Id="Folder" Type="PathEdit" X="20" Y="100" Width="320" Height="18" Property="WIXUI_INSTALLDIR" Indirect="yes" />
<Control Id="ChangeFolder" Type="PushButton" X="20" Y="120" Width="56" Height="17" Text="!(loc.InstallDirDlgChange)" />
<Control Id="StartMenuShortcutCheckBox" Type="CheckBox" X="20" Y="160" Width="290" Height="17" Property="INSTALLSTARTMENUSHORTCUT" CheckBoxValue="1" Text="Create a shortcut for [ProductName] in the start menu." />
<Control Id="DesktopShortcutCheckBox" Type="CheckBox" X="20" Y="180" Width="290" Height="17" Property="INSTALLDESKTOPSHORTCUT" CheckBoxValue="1" Text="Create a shortcut for [ProductName] in the desktop." />
<Control Id="ScheduledTaskCheckBox" Type="CheckBox" X="20" Y="200" Width="330" Height="17" Property="CREATESCHEDULEDTASK" CheckBoxValue="1" Text="Automatically start [ProductName] at logon." />
<Control Id="DesktopShortcutCheckBox" Type="CheckBox" X="20" Y="160" Width="290" Height="17" Property="INSTALLDESKTOPSHORTCUT" CheckBoxValue="1" Text="Create a shortcut for [ProductName] in the desktop." />
<Control Id="ScheduledTaskCheckBox" Type="CheckBox" X="20" Y="180" Width="330" Height="17" Property="CREATESCHEDULEDTASK" CheckBoxValue="1" Text="Automatically start [ProductName] at logon." />
</Dialog>
</UI>
</Fragment>

View File

@ -62,7 +62,6 @@ Patch dialog sequence:
<Publish Dialog="PTInstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4">WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"</Publish>
<Publish Dialog="PTInstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1">1</Publish>
<Publish Dialog="PTInstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2">1</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="PTInstallDirDlg" Order="1">NOT Installed</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2">Installed AND NOT PATCH</Publish>
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2">Installed AND PATCH</Publish>
@ -72,8 +71,6 @@ Patch dialog sequence:
<Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg">1</Publish>
<Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg">1</Publish>
<Property Id="ARPNOMODIFY" Value="1" />
</UI>
<UIRef Id="WixUI_Common" />

View File

@ -25,8 +25,9 @@
<Icon Id="powertoys.ico" SourceFile="$(var.BinX64Dir)\svgs\icon.ico"/>
<Property Id="ARPPRODUCTICON" Value="powertoys.ico" />
<Feature Id="ProductFeature" Title="PowerToys" Level="1">
<ComponentGroupRef Id="ProductComponents" />
<Feature Id="CoreFeature" Title="PowerToys" AllowAdvertise="no" Absent="disallow" TypicalDefault="install"
Description="Contains the Shortcut Guide and Fancy Zones features.">
<ComponentGroupRef Id="CoreComponents" />
</Feature>
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
<UI>
@ -178,7 +179,18 @@
<Fragment>
<DirectoryRef Id="INSTALLFOLDER" FileSource="$(var.BinX64Dir)">
<Component Id="powertoys_exe" Guid="A2C66D91-3485-4D00-B04D-91844E6B345B" Win64="yes">
<File Id="PowerToys.exe" KeyPath="yes" Checksum="yes" />
<File Id="PowerToys.exe" KeyPath="yes" Checksum="yes">
<Shortcut Id="ApplicationStartMenuShortcut"
Name="PowerToys"
Description="PowerToys - Windows system utilities to maximize productivity"
Directory="ApplicationProgramsFolder"
WorkingDirectory="INSTALLFOLDER"
Icon="powertoys.ico"
IconIndex="0"
Advertise="yes" />
</File>
<RemoveFolder Id="DeleteShortcutFolder" Directory="ApplicationProgramsFolder" On="uninstall" />
</Component>
<Component Id="settings_exe" Guid="A5A461A9-7097-4CBA-9D39-3DBBB6B7B80C" Win64="yes">
<File Id="PowerToysSettings.exe" KeyPath="yes" Checksum="yes" />
@ -227,27 +239,6 @@
</Component>
</DirectoryRef>
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut" Guid="43184672-485D-4632-A16C-12D5E33B1F11">
<Condition>INSTALLSTARTMENUSHORTCUT</Condition>
<Shortcut Id="ApplicationStartMenuShortcut"
Name="PowerToys"
Description="PowerToys - Windows system utilities to maximize productivity"
Target="[!PowerToys.exe]"
WorkingDirectory="INSTALLFOLDER"
Icon="powertoys.ico"
IconIndex="0"/>
<RemoveFolder Id="RemoveApplicationProgramsFolder" Directory="ApplicationProgramsFolder" On="uninstall"/>
<RegistryValue Root="HKCU"
Key="Software\[Manufacturer]\[ProductName]"
Name="startshorcutinstalled"
Type="integer"
Value="1"
KeyPath="yes"/>
</Component>
</DirectoryRef>
</Fragment>
<Fragment>
<DirectoryRef Id="DesktopFolder">
<Component Id="DesktopShortcut" Guid="87321F2B-CC48-4326-881E-9C62CC260DC8">
<Condition>INSTALLDESKTOPSHORTCUT</Condition>
@ -269,13 +260,12 @@
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<ComponentGroup Id="CoreComponents" Directory="INSTALLFOLDER">
<ComponentRef Id="powertoys_exe" />
<ComponentRef Id="License_rtf" />
<ComponentRef Id="PowerToysSvgs" />
<ComponentRef Id="Module_ShortcutGuide" />
<ComponentRef Id="Module_FancyZones" />
<ComponentRef Id="ApplicationShortcut" />
<ComponentRef Id="DesktopShortcut" />
<ComponentRef Id="settings_exe" />
<ComponentRef Id="settings_html" />