An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
Rust androidanydeskdartflatpakflutterflutter-appsioslinuxmacosp2prdpremote-controlremote-desktoprustrust-langteamviewervncwaylandwindows
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
<?include ../Includes.wxi?>
<Fragment>
<Property Id="FIREWALLRULES" Secure="yes" />
<Property Id="PREVIOUSFIREWALLRULES" Secure="yes">
<!-- For this per-machine MSI, Root="HKLM" Key="Software\Classes\$(var.RegKeyRoot)" reads the machine-stored value directly.
Keep Root="HKCR" Key="$(var.RegKeyRoot)" for consistency with existing shortcut/printer searches.
https://learn.microsoft.com/en-us/windows/win32/msi/registry-table -->
<RegistrySearch Id="FirewallRulesSearch" Root="HKCR" Key="$(var.RegKeyRoot)" Name="FIREWALLRULES" Type="raw" />
</Property>
<SetProperty Action="SetSavedFirewallRulesValue" Id="FIREWALLRULES" Value="[PREVIOUSFIREWALLRULES]" After="AppSearch" Sequence="first" Condition="NOT FIREWALLRULES AND PREVIOUSFIREWALLRULES" />
<SetProperty Action="NormalizeFirewallRulesEnabled" Id="FIREWALLRULES" Value="1" After="SetSavedFirewallRulesValue" Sequence="first" Condition="NOT (FIREWALLRULES = "0" OR FIREWALLRULES ~= "N")" />
<SetProperty Action="NormalizeFirewallRulesDisabled" Id="FIREWALLRULES" Value="0" After="NormalizeFirewallRulesEnabled" Sequence="first" Condition="FIREWALLRULES ~= "N"" />
<!-- Maintenance may leave the registry component unchanged; persist the resolved choice explicitly. -->
<CustomAction Id="PersistFirewallRulesEnabled" Directory="System64Folder" ExeCommand='"[System64Folder]reg.exe" add "HKLM\Software\Classes\$(var.RegKeyRoot)" /v FIREWALLRULES /t REG_SZ /d 1 /f' Execute="deferred" Impersonate="no" Return="ignore" />
<CustomAction Id="PersistFirewallRulesDisabled" Directory="System64Folder" ExeCommand='"[System64Folder]reg.exe" add "HKLM\Software\Classes\$(var.RegKeyRoot)" /v FIREWALLRULES /t REG_SZ /d 0 /f' Execute="deferred" Impersonate="no" Return="ignore" />
<CustomAction Id="RollbackFirewallRulesEnabled" Directory="System64Folder" ExeCommand='"[System64Folder]reg.exe" add "HKLM\Software\Classes\$(var.RegKeyRoot)" /v FIREWALLRULES /t REG_SZ /d 1 /f' Execute="rollback" Impersonate="no" Return="ignore" />
<CustomAction Id="RollbackFirewallRulesDisabled" Directory="System64Folder" ExeCommand='"[System64Folder]reg.exe" add "HKLM\Software\Classes\$(var.RegKeyRoot)" /v FIREWALLRULES /t REG_SZ /d 0 /f' Execute="rollback" Impersonate="no" Return="ignore" />
<CustomAction Id="RollbackFirewallRulesAbsent" Directory="System64Folder" ExeCommand='"[System64Folder]reg.exe" delete "HKLM\Software\Classes\$(var.RegKeyRoot)" /v FIREWALLRULES /f' Execute="rollback" Impersonate="no" Return="ignore" />
<InstallExecuteSequence>
<Custom Action="RollbackFirewallRulesAbsent" After="WriteRegistryValues" Condition="Installed AND NOT REMOVE AND NOT PREVIOUSFIREWALLRULES AND (FIREWALLRULES = 0 OR FIREWALLRULES = 1)" />
<Custom Action="RollbackFirewallRulesDisabled" After="RollbackFirewallRulesAbsent" Condition="Installed AND NOT REMOVE AND PREVIOUSFIREWALLRULES = 0 AND (FIREWALLRULES = 0 OR FIREWALLRULES = 1)" />
<Custom Action="RollbackFirewallRulesEnabled" After="RollbackFirewallRulesDisabled" Condition="Installed AND NOT REMOVE AND PREVIOUSFIREWALLRULES = 1 AND (FIREWALLRULES = 0 OR FIREWALLRULES = 1)" />
<Custom Action="PersistFirewallRulesEnabled" After="RollbackFirewallRulesEnabled" Condition="Installed AND NOT REMOVE AND FIREWALLRULES = 1" />
<Custom Action="PersistFirewallRulesDisabled" After="PersistFirewallRulesEnabled" Condition="Installed AND NOT REMOVE AND FIREWALLRULES = 0" />
</InstallExecuteSequence>
<!-- Regs for shortcuts are defined in "Fragments/ShortcutProperties.wxs" -->
<!-- Component that persists the property values to the registry so they are available during an upgrade/modify -->
<Property Id="CURRENT_SHARE_RDP" Secure="yes">
<RegistrySearch Id="CurrentShareRdpSearch" Root="HKLM" Key="Software\$(var.Product)\InstallState\$(var.Product)" Name="share_rdp" Type="raw" />
</Property>
<Property Id="LEGACY_SHARE_RDP" Secure="yes">
<RegistrySearch Id="LegacyShareRdpSearch" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\$(var.Product)" Name="share_rdp" Type="raw" Bitness="always64" />
</Property>
<Property Id="LEGACY_SHARE_RDP32" Secure="yes">
<RegistrySearch Id="LegacyShareRdp32Search" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\$(var.Product)" Name="share_rdp" Type="raw" Bitness="always32" />
</Property>
<Property Id="APP_WINDOWS_INSTALLER32" Secure="yes">
<RegistrySearch Id="AppWindowsInstaller32Search" Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\$(var.Product)" Name="WindowsInstaller" Type="raw" Bitness="always32" />
</Property>
<Property Id="SHARE_RDP" Secure="yes" />
<SetProperty Action="SetShareRdpFromCurrentState" Id="SHARE_RDP" Value="[CURRENT_SHARE_RDP]" After="AppSearch" Sequence="first" Condition="CURRENT_SHARE_RDP" />
<SetProperty Action="SetShareRdpFromLegacyState" Id="SHARE_RDP" Value="[LEGACY_SHARE_RDP]" After="SetShareRdpFromCurrentState" Sequence="first" Condition="NOT CURRENT_SHARE_RDP AND LEGACY_SHARE_RDP" />
<SetProperty Action="SetShareRdpFromLegacyState32" Id="SHARE_RDP" Value="[LEGACY_SHARE_RDP32]" After="SetShareRdpFromLegacyState" Sequence="first" Condition="NOT CURRENT_SHARE_RDP AND NOT LEGACY_SHARE_RDP AND LEGACY_SHARE_RDP32" />
<DirectoryRef Id="INSTALLFOLDER_INNER">
<Component Id="Product.Registry.InstallFolder" Guid="3196EDA7-9AEF-4705-A0C8-E3F3ECCCB153">
<RegistryKey Root="HKCR" Key="$(var.RegKeyRoot)">
<RegistryValue Type="string" Name="INSTALLFOLDER" Value="[INSTALLFOLDER_INNER]" />
<RegistryValue Type="string" Name="FIREWALLRULES" Value="[FIREWALLRULES]" />
</RegistryKey>
</Component>
<Component Id="Product.Registry.DefaultIcon" Guid="6DBF2690-0955-4C6A-940F-634DDA503F49">
<RegistryKey Root="HKCR" Key="$(var.RegKeyRoot)\DefaultIcon">
<RegistryValue Type="string" Value='"[INSTALLFOLDER_INNER]$(var.Product).exe",0' />
</RegistryKey>
</Component>
<Component Id="Product.Registry.CommandPlay" Guid="613C9E4F-2F1F-45A3-96E2-26EBBEBA6B0E">
<RegistryKey Root="HKCR" Key="$(var.RegKeyRoot)\shell" />
<RegistryKey Root="HKCR" Key="$(var.RegKeyRoot)\shell\open" />
<RegistryKey Root="HKCR" Key="$(var.RegKeyRoot)\shell\open\command">
<RegistryValue Type="string" Value='"[INSTALLFOLDER_INNER]$(var.Product).exe" --play "%1"' />
</RegistryKey>
</Component>
<Component Id="Product.Registry.URLProtocol" Guid="565BE3F8-23A7-4B9D-B0DE-6D51CC86FC0B">
<RegistryKey Root="HKCR" Key="$(var.ProductLower)">
<RegistryValue Type="string" Name="URL Protocol" Value="" />
</RegistryKey>
</Component>
<Component Id="Product.Registry.Command" Guid="BC8D581C-5960-4843-93DC-E347CD43BD49">
<RegistryKey Root="HKCR" Key="$(var.ProductLower)\shell" />
<RegistryKey Root="HKCR" Key="$(var.ProductLower)\shell\open" />
<RegistryKey Root="HKCR" Key="$(var.ProductLower)\shell\open\command">
<RegistryValue Type="string" Value='"[INSTALLFOLDER_INNER]$(var.Product).exe" "%1"' />
</RegistryKey>
</Component>
<Component Id="Product.Registry.InstallState" Guid="E310003A-C292-4851-AE20-7A9B186060CE">
<RegistryKey Root="HKLM" Key="Software\$(var.Product)\InstallState\$(var.Product)" ForceDeleteOnUninstall="yes">
<RegistryValue Type="string" Name="BuildDate" Value="$(var.BuildDate)" />
<RegistryValue Type="string" Name="share_rdp" Value="[SHARE_RDP]" />
<RegistryValue Type="string" Name="InstallLocation" Value="[INSTALLFOLDER_INNER]" />
<RegistryValue Type="integer" Name="WindowsInstaller" Value="1" />
<RegistryValue Type="string" Name="MsiProductCode" Value="[ProductCode]" KeyPath="yes" />
<!--$InstallStateStart$-->
<!--$InstallStateEnd$-->
</RegistryKey>
</Component>
</DirectoryRef>
<StandardDirectory Id="CommonAppDataFolder">
<Component Id="Product.Registry.RemoveLegacyUninstall64" Guid="7524B741-94C2-4C50-A151-DDB37860DC20" Bitness="always64" KeyPath="yes" Condition="APP_WINDOWS_INSTALLER="#1"">
<RemoveRegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\$(var.Product)" Action="removeOnInstall" />
</Component>
<Component Id="Product.Registry.RemoveLegacyUninstall32" Guid="CB50B9AA-B83A-4AC2-BB27-81358F0E74E6" Bitness="always32" KeyPath="yes" Condition="APP_WINDOWS_INSTALLER32="#1"">
<RemoveRegistryKey Root="HKLM" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\$(var.Product)" Action="removeOnInstall" />
</Component>
</StandardDirectory>
</Fragment>
</Wix>