swiftlang / swift-installer-scripts

Apache License 2.0
73 stars 38 forks source link

The Windows installer fails when running unelevated #253

Closed tristanlabelle closed 1 year ago

tristanlabelle commented 1 year ago

Since https://github.com/apple/swift-installer-scripts/pull/251, the installer packages the VC redistributable, which is a machine-wide install, even though the Swift toolchain itself if a per-user install. This step hence fails when running the installer unelevated. We might be able to switch back to using ExePackage, which I believe will show an elevation prompt but has other limitations on detecting prior installations, or we could mark that step Vital="false" and allow it to fail when run unelevated.

barnson commented 1 year ago

Burn uses CreateProcessW to launch ExePackages too, so there's no UAC prompt.

tristanlabelle commented 1 year ago

Fixed by bundling individual dlls via https://github.com/apple/swift/pull/69743 and https://github.com/apple/swift-installer-scripts/pull/256