82 lines
3.9 KiB
XML
82 lines
3.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
NetDesk by Akronlogic — WiX v4 MSI for enterprise / unattended deployment.
|
|
|
|
Installs the portable payload (NetDesk.exe + the 3 MinGW runtime DLLs) to
|
|
%ProgramFiles%\NetDesk, then runs `NetDesk.exe --config ...` as a deferred
|
|
custom action to write config.json non-interactively from the deployment
|
|
properties, and registers the unattended host task.
|
|
|
|
Build (see build-msi.ps1 — needs the WiX toolset, which needs the .NET SDK):
|
|
dotnet tool install --global wix
|
|
wix build packaging\netdesk.wxs -d Payload="packaging\dist\NetDesk-Portable" -arch x64 -o packaging\dist\NetDesk.msi
|
|
|
|
Deploy (GPO / SCCM / Intune, fully silent):
|
|
msiexec /i NetDesk.msi /qn SERVER="wss://relay.corp/ws" REGKEY="CORP1" PASSWORD="Sup3rSecret!" HOSTID="123456789"
|
|
|
|
NOTE: authored on a box that has only the .NET runtime (no SDK, no WiX), so this
|
|
source has NOT been compiled here. The unattended `--config` custom action it
|
|
drives IS proven (viewer config_cli_tests + a live `NetDesk.exe --config` run).
|
|
Verify this .wxs with `wix build` on a box with the WiX toolset before shipping.
|
|
-->
|
|
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
|
|
<Package Name="NetDesk"
|
|
Manufacturer="Akronlogic"
|
|
Version="1.5.0"
|
|
UpgradeCode="6f9a1d2e-3b4c-4d5e-8f10-ac11de550001"
|
|
Scope="perMachine">
|
|
|
|
<MajorUpgrade DowngradeErrorMessage="A newer version of NetDesk is already installed." />
|
|
<MediaTemplate EmbedCab="yes" />
|
|
|
|
<!-- Unattended-deployment properties (passed on the msiexec command line).
|
|
PASSWORD is hidden so it never lands in the verbose MSI log. -->
|
|
<Property Id="SERVER" Secure="yes" />
|
|
<Property Id="REGKEY" Secure="yes" />
|
|
<Property Id="PASSWORD" Secure="yes" Hidden="yes" />
|
|
<Property Id="HOSTID" Secure="yes" />
|
|
|
|
<StandardDirectory Id="ProgramFiles64Folder">
|
|
<Directory Id="INSTALLFOLDER" Name="NetDesk">
|
|
<Component Id="cmpNetDeskExe" Bitness="always64">
|
|
<File Id="NetDeskExe" Source="$(Payload)\NetDesk.exe" KeyPath="yes" />
|
|
</Component>
|
|
<Component Id="cmpGcc" Bitness="always64">
|
|
<File Source="$(Payload)\libgcc_s_seh-1.dll" KeyPath="yes" />
|
|
</Component>
|
|
<Component Id="cmpStdcpp" Bitness="always64">
|
|
<File Source="$(Payload)\libstdc++-6.dll" KeyPath="yes" />
|
|
</Component>
|
|
<Component Id="cmpPthread" Bitness="always64">
|
|
<File Source="$(Payload)\libwinpthread-1.dll" KeyPath="yes" />
|
|
</Component>
|
|
<Component Id="cmpReadme" Bitness="always64">
|
|
<File Source="$(Payload)\README.txt" KeyPath="yes" />
|
|
</Component>
|
|
</Directory>
|
|
</StandardDirectory>
|
|
|
|
<Feature Id="Main" Title="NetDesk" Level="1">
|
|
<ComponentRef Id="cmpNetDeskExe" />
|
|
<ComponentRef Id="cmpGcc" />
|
|
<ComponentRef Id="cmpStdcpp" />
|
|
<ComponentRef Id="cmpPthread" />
|
|
<ComponentRef Id="cmpReadme" />
|
|
</Feature>
|
|
|
|
<!-- After the files are laid down, write config.json from the deployment
|
|
properties (only when a PASSWORD was supplied), then register the host
|
|
task so it runs unattended. Both run the just-installed NetDesk.exe. -->
|
|
<CustomAction Id="WriteConfig" FileRef="NetDeskExe" Execute="deferred"
|
|
Impersonate="no" Return="ignore"
|
|
ExeCommand="--config --server "[SERVER]" --reg-key "[REGKEY]" --password "[PASSWORD]" --id "[HOSTID]"" />
|
|
<CustomAction Id="InstallTask" FileRef="NetDeskExe" Execute="deferred"
|
|
Impersonate="no" Return="ignore" ExeCommand="--install-service" />
|
|
|
|
<InstallExecuteSequence>
|
|
<Custom Action="WriteConfig" After="InstallFiles" Condition="NOT Installed AND PASSWORD" />
|
|
<Custom Action="InstallTask" After="WriteConfig" Condition="NOT Installed" />
|
|
</InstallExecuteSequence>
|
|
</Package>
|
|
</Wix>
|