2024-11-22 06:37:52 +00:00
<CPackWiXPatch >
<CPackWiXFragment Id= "CM_CP_deskflow_daemon.exe" >
2025-03-07 10:09:02 +00:00
<ServiceInstall
Id="ServiceInstall"
Name="Deskflow"
2025-03-07 14:35:09 +00:00
DisplayName="Deskflow"
Description="Runs the Core process on secure desktops (UAC prompts, login screen, etc)."
ErrorControl="normal"
2025-03-07 10:09:02 +00:00
Start="auto"
Type="ownProcess">
<util:ServiceConfig
ResetPeriodInDays="1"
RestartServiceDelayInSeconds="1"
2025-03-07 14:35:09 +00:00
FirstFailureActionType="restart"
2025-03-07 10:09:02 +00:00
SecondFailureActionType="restart"
2025-03-07 14:35:09 +00:00
ThirdFailureActionType="none"
2025-03-07 10:09:02 +00:00
/>
2024-11-22 06:37:52 +00:00
</ServiceInstall>
<ServiceControl Id= "ServiceControl" Name= "Deskflow" Remove= "uninstall" Start= "install" Stop= "both" />
2025-07-19 14:05:00 +00:00
<RemoveFile Id= "RmOldLog" On= "install" Name= "deskflow-daemon.log" />
2024-11-22 06:37:52 +00:00
</CPackWiXFragment>
2025-03-07 15:27:15 +00:00
2025-08-19 15:58:21 +00:00
<CPackWiXFragment Id= "CM_CP_deskflow_core.exe" >
<firewall:FirewallException Id= "ServerFirewallException" Name= "Deskflow Server" Program= "[INSTALL_ROOT]deskflow-core.exe" Scope= "any" />
<firewall:FirewallException Id= "ClientFirewallException" Name= "Deskflow Client" Program= "[INSTALL_ROOT]deskflow-core.exe" Scope= "any" />
2024-11-22 06:37:52 +00:00
</CPackWiXFragment>
2025-03-07 15:27:15 +00:00
2024-11-22 06:37:52 +00:00
<CPackWiXFragment Id= "#PRODUCT" >
2025-03-07 15:27:15 +00:00
<Property Id= "VC_REDIST_INSTALLED" >
<RegistrySearch
Id="FindVCRedist"
Root="HKLM"
2025-04-21 05:25:31 +00:00
Key="SOFTWARE\Microsoft\VisualStudio\@REQUIRED_MSVC_RUNTIME_MAJOR@.0\VC\Runtimes\@BUILD_ARCHITECTURE@"
2025-03-07 15:27:15 +00:00
Name="Installed"
Type="raw" />
</Property>
2025-03-11 14:53:48 +00:00
<Binary Id= "CustomDLL" SourceFile= "@CMAKE_CURRENT_BINARY_DIR@/wix-custom.dll" />
2026-05-28 16:57:11 +00:00
<!--
Close any running Deskflow processes before file replacement so the
installer does not have to schedule files for replace-on-reboot.
Legacy names (deskflow-server.exe, deskflow-client.exe) are still
listed so upgrades from pre-1.24 installs (separate server/client
binaries) also complete without prompting for a reboot.
-->
<util:CloseApplication
Id="CloseDeskflowGui"
Target="deskflow.exe"
CloseMessage="yes"
RebootPrompt="no"
TerminateProcess="10" />
<util:CloseApplication
Id="CloseDeskflowCore"
Target="deskflow-core.exe"
CloseMessage="yes"
RebootPrompt="no"
TerminateProcess="10" />
<util:CloseApplication
Id="CloseDeskflowServer"
Target="deskflow-server.exe"
CloseMessage="yes"
RebootPrompt="no"
TerminateProcess="10" />
<util:CloseApplication
Id="CloseDeskflowClient"
Target="deskflow-client.exe"
CloseMessage="yes"
RebootPrompt="no"
TerminateProcess="10" />
2025-03-29 14:14:30 +00:00
<UI >
<Publish Dialog= "ExitDialog"
Control="Finish"
Event="DoAction"
Value="RunDeskflow"
2025-07-14 15:08:19 +00:00
Condition= "WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed" />
<Property Id= "WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value= "1" />
<Property Id= "WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value= "Run Deskflow when finished" />
2025-03-29 14:14:30 +00:00
</UI>
2025-03-11 14:53:48 +00:00
<CustomAction
Id="CheckVCRedist"
BinaryRef="CustomDLL"
DllEntry="CheckVCRedist"
Execute="immediate" />
2025-03-07 15:27:15 +00:00
<CustomAction
Id="ShowVCRedistError"
2025-03-11 14:53:48 +00:00
Error="Microsoft Visual C++ Redistributable v@REQUIRED_MSVC_RUNTIME_MAJOR@.@REQUIRED_MSVC_RUNTIME_MINOR@ or later is required. Please download and install the latest version and then restart the installation. See our documentation for instructions." />
<CustomAction
Id="RunDeskflow"
2025-03-29 14:14:30 +00:00
ExeCommand="[INSTALL_ROOT]deskflow.exe"
Directory="INSTALL_ROOT"
Execute="immediate"
Impersonate="yes"
2025-03-11 14:53:48 +00:00
Return="asyncNoWait" />
2025-03-07 15:27:15 +00:00
2024-11-22 06:37:52 +00:00
<InstallExecuteSequence >
2025-03-11 14:53:48 +00:00
<Custom
Action="CheckVCRedist"
Before="InstallInitialize"
Condition="NOT Installed AND VC_REDIST_INSTALLED" />
<Custom
Action="ShowVCRedistError"
Before="InstallInitialize"
Condition="NOT Installed AND (NOT VC_REDIST_INSTALLED OR NOT VC_REDIST_VERSION_OK)" />
2024-11-22 06:37:52 +00:00
</InstallExecuteSequence>
</CPackWiXFragment>
</CPackWiXPatch>