ScoopInstaller / Scoop

A command-line installer for Windows.
https://scoop.sh
Other
21.21k stars 1.41k forks source link

[Bug] Creating a shim for a binary with `update` in the name set's UAC and breaks #5580

Open stevehipwell opened 1 year ago

stevehipwell commented 1 year ago

Bug Report

Current Behavior

When creating a shim for updatecli.exe the shim has UAC enabled and does not correctly call the shimmed binary.

Expected Behavior

I'd expect the shim to work correctly.

Additional context/output

You can replicate this by manually copying a shim and giving it a name with update in it.

Possible Solution

System details

Windows version: [e.g. 7, 8, 10, 11]

OS architecture: [e.g. 32bit, 64bit, arm64]

PowerShell version: [output of "$($PSVersionTable.PSVersion)"]

Additional software: [(optional) e.g. ConEmu, Git]

Scoop Configuration

//# Your configuration here
HUMORCE commented 1 year ago

Manifest copy for testing, reproducing the issue: https://github.com/ScoopInstaller/Tests/blob/master/bucket/u/updatecli.json

rashil2000 commented 1 year ago

I think this needs to be reported to https://github.com/kiennq/scoop-better-shimexe

Any ideas @kiennq? 🤔

kiennq commented 8 months ago

Sorry for the late reply. The issue is because of Windows special naming convention: if the exe name contains update or install, it will be treated as requiring UAC. The fix is to add an application manifest saying that we don't need that. Please check the latest pre-release version to see if it resolves your issue. @stevehipwell