Files
QuickLook/QuickLook.Installer/Product.wxs
T
Copilot 669d7b60c4
build / build (push) Has been cancelled
build / publish (push) Has been cancelled
installer: auto-terminate QuickLook.exe before install/upgrade/uninstall (#1918)
* Initial plan

* fix: auto-close QuickLook.exe before MSI install/upgrade/uninstall to prevent locked-file warnings

Agent-Logs-Url: https://github.com/QL-Win/QuickLook/sessions/107141f9-3b6f-4409-8cd2-2d3663c692c9

Co-authored-by: emako <24737061+emako@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: emako <24737061+emako@users.noreply.github.com>
2026-04-16 11:27:20 +08:00

86 lines
3.5 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Id="*" Name="QuickLook" Language="1033"
Version="!(bind.FileVersion.fil22F7B7F07E63622AD2451459086A3CF2)" Manufacturer="QL-Win"
UpgradeCode="c83b9c02-87d6-494e-9f5f-cf4c3900a54d">
<Package InstallerVersion="500" Compressed="yes" Platform="x86" InstallScope="perUser" />
<MajorUpgrade Schedule="afterInstallValidate" AllowDowngrades="yes" />
<MediaTemplate EmbedCab="yes" CompressionLevel="low" />
<Property Id='ALLUSERS' Value='2' />
<Property Id='MSIINSTALLPERUSER' Value='1' />
<WixVariable Id="WixUILicenseRtf" Value="gpl.rtf" />
<Feature Id="ProductFeature" Title="QuickLook.Installer" Level="1">
<ComponentGroupRef Id="QuickLookComponents" />
<ComponentRef Id="ApplicationShortcutDesktop" />
<ComponentRef Id="ApplicationShortcutProgramMenu" />
</Feature>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramMenuFolder">
<Component Id="ApplicationShortcutProgramMenu" Guid="4F3E84DA-0E8B-44E9-B59D-B3AFAE70519E">
<Shortcut Id="ApplicationProgramMenuShortcut"
Name="QuickLook"
Description="QuickLook lets you preview any file by pressing the space bar."
Target="[INSTALLFOLDER]QuickLook.exe"
WorkingDirectory="INSTALLFOLDER" />
<RemoveFolder Id="ProgramMenuFolder" On="uninstall" />
<RegistryValue
Root="HKCU"
Key="Software\QuickLook"
Name="installed"
Type="integer"
Value="1"
KeyPath="yes" />
</Component>
</Directory>
<Directory Id="DesktopFolder" Name="Desktop">
<Component Id="ApplicationShortcutDesktop" Guid="9ECBF18A-F3C7-495A-9327-02A2E79ABBD7">
<Shortcut Id="ApplicationDesktopShortcut"
Name="QuickLook"
Description="QuickLook lets you preview any file by pressing the space bar."
Target="[INSTALLFOLDER]QuickLook.exe"
WorkingDirectory="INSTALLFOLDER" />
<RemoveFolder Id="DesktopFolder" On="uninstall" />
<RegistryValue
Root="HKCU"
Key="Software\QuickLook"
Name="installed"
Type="integer"
Value="1"
KeyPath="yes" />
</Component>
</Directory>
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="QuickLook" />
</Directory>
</Directory>
<!-- Close QuickLook before install/upgrade/uninstall to prevent locked-file warnings -->
<util:CloseApplication Id="CloseQuickLookExe"
Target="QuickLook.exe"
CloseMessage="yes"
RebootPrompt="no"
TerminateProcess="1"
Sequence="800" />
<CustomAction Id="LaunchApplication"
FileKey="fil22F7B7F07E63622AD2451459086A3CF2"
ExeCommand="/first"
Execute="immediate"
Impersonate="yes"
Return="asyncNoWait" />
<UI>
<UIRef Id="WixUI_InstallDir" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
<Publish Dialog="ExitDialog" Control="Finish" Order="1" Event="DoAction" Value="LaunchApplication">NOT Installed</Publish>
</UI>
</Product>
</Wix>