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" />
</CPackWiXFragment>
2025-03-07 15:27:15 +00:00
2024-11-22 06:37:52 +00:00
<CPackWiXFragment Id= "CM_CP_deskflow_server.exe" >
<firewall:FirewallException Id= "ServerFirewallException" Name= "Deskflow Server" Program= "[INSTALL_ROOT]deskflow-server.exe" Scope= "any" />
</CPackWiXFragment>
2025-03-07 15:27:15 +00:00
2024-11-22 06:37:52 +00:00
<CPackWiXFragment Id= "CM_CP_deskflow_client.exe" >
<firewall:FirewallException Id= "ClientFirewallException" Name= "Deskflow Client" Program= "[INSTALL_ROOT]deskflow-client.exe" Scope= "any" />
</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" />
2025-03-29 14:14:30 +00:00
<UI >
<Publish Dialog= "ExitDialog"
Control="Finish"
Event="DoAction"
Value="RunDeskflow"
Condition= "NOT Installed" />
</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>