Repository navigation
Conversation
- add winget manifests for ConSol.SNClient 1.01.0 - add MSI product icon and ARP install location/help/about links
4 tasks
icon16.png is the 256x256 variant; generate the MSI icon with 16-256px entries instead of using the 32x32 icon.png.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AI generated PR description, I was working with it for a while doing non-elevated / elevated winget installs/uninstalls.
Summary
This adds Windows Package Manager (winget) support for SNClient and improves the MSI's Add/Remove Programs metadata.
Included
packaging/winget/— multi-file winget manifest set forConSol.SNClient1.01.0:InstallerType: wix,Scope: machineInstallModes: interactive, silent, silentWithProgressElevationRequirement: elevatesSelfInstallationMetadatarunssnclient.exe --versionAppsAndFeaturesEntrieswith ProductCode/UpgradeCodepackaging/windows/snclient.wxs— MSI ARP metadata:ARPPRODUCTICONARPINSTALLLOCATION(set afterCostFinalize)ARPHELPLINKARPURLINFOABOUTpackaging/windows/snclient.ico— multi-size icon (16, 24, 32, 48, 64, 128, 256 px)generated from the 256x256
winres/icon16.pngVerification status
Tested on Windows 11 against the signed v1.01.0 release MSI via
winget install --manifest .\winget\:winget validate --manifest .\winget\snclientservice created/startedSNClientfirewall rule createdcheck_snclientsnclient_local.iniwinget uninstall --silentReboot persistence was verified on Windows 11: the delayed auto-start service returned as RUNNING, the firewall rule and 8443 listener were still present, and the remote check succeeded.
The MSI changes were verified at MSI table level by rebuilding locally with WiX 3.14.1.8722:
Icontable containsSNClientIcon.icowith 16-256 px entriesARPPRODUCTICON,ARPHELPLINK,ARPURLINFOABOUTare presentSetARPINSTALLLOCATIONis sequenced at 1001, afterCostFinalizeCNDL1077warningThey are not exercised by an installed build yet, because the v1.01.0 release MSI predates them.
What does not work / known limitations
1.
ElevationRequirement: elevationRequiredcannot be usedUsing
elevationRequiredmakes winget launch the MSI withShellExecute(..., "runas"), which fails with:This is the known winget MSI elevation bug:
The manifests use
elevatesSelfinstead. Winget then invokesmsiexec, which requests UAC itself. Microsoft.PowerShell uses the same workaround for its per-machine WiX MSI.This should be revisited once the winget MSI elevation bug is fixed.
2. Non-elevated
--silentuninstall fails with 1603winget uninstall --manifest .\winget\ --silentfrom a non-elevated shell does not get the UAC prompt and fails with winget exit code 1603. The Windows Installer log shows the real cause: error 1730,You must be an Administrator to remove this application.The same uninstall works:--silent, and--silent, after accepting the UAC prompt.The non-elevated silent install is different:
msiexecdoes request UAC (MsiRunningElevated = 1) and the install succeeds. Only the silent uninstall lacks elevation.The winget-pkgs validation pipeline installs and uninstalls silently, so this is the main validation risk. There is a working precedent (Microsoft.PowerShell), but it should be tested in the validation environment before relying on it.
3. The v1.01.0 MSI does not contain the new icon/ARP metadata
The winget manifests currently point at the v1.01.0 release assets. The icon/ARP changes in this PR only apply to the next release.
If the winget package should include them, cut a release from this branch first and update the manifests.
4. MSI upgrades reset parts of
snclient.iniOn upgrade,
snclient.exe install pkgmerges the installer defaults intosnclient.ini.allowed hosts, ports, SSL and module toggles are overwritten.Custom settings should live in
snclient_local.ini, which the MSI does not touch. A future fix should skip the merge whenWIX_UPGRADE_DETECTEDis set.5. Default password is fail-closed
The default password remains
CHANGEME, but login is rejected while it is unchanged. A fresh winget install is therefore not remotely usable until configured. This is safe by default, but worth documenting for users.6. Server-side winget validation may still flag things
winget validateonly checks the manifest schema. The winget-pkgs validation can still flag:snclient.exe --versionmetadata is intended to help,winres/icon16.png,Before submitting to winget-pkgs
PackageVersionInstallerSha256ProductCodeper architecture (the MSI usesId="*", so these change per build)ReleaseDateandReleaseNotesUrlmanifests/c/ConSol/SNClient/<version>/pathmicrosoft/winget-pkgsunder:elevatesSelfworkaround and the open winget bug,InstallationMetadataforsnclient.exe --version,snclient_local.iniis intentionally preserved on uninstall.Follow-ups (not required for this PR)
ServiceControlentry forsnclient:CustomInstallerActionwithNOT REMOVE ~= "ALL".mergeIniFiledefaults onWIX_UPGRADE_DETECTED.fix-msi-installer-hang-when-service-is-runnning(stop the old service beforeRemoveExistingProducts).Testing notes