Enumerate and display blocking processes when installer exits with packageInUse / packageInUseByApplication
Maintainer antworten meist innerhalb von 2 Tagen
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 55/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- cpp
- Bereich
- cli, operating-systems
Rechercherichtung
Start by reading InstallFlow.cpp and ShellExecuteInstallerHandler.cpp in AppInstallerCLICore, then review the Windows Restart Manager APIs in rstrtmgr.h. Implement the detection flow only for packageInUse and packageInUseByApplication responses, and verify that the error block displays each blocking application's name and PID while retaining the installer exit code.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Relevant area(s)
WinGet CLI
Description of the new feature / enhancement
Problem Statement
When an installer exits due to locked files (e.g. exit code 6 mapped to packageInUse or packageInUseByApplication in the manifest schema), WinGet outputs a localized message:
"The files modified by the installer are currently being used by another application. Please close the applications, then try again."
However, WinGet provides no visibility into which specific application or process is holding the lock.
In automated workflows, silent upgrades (-h/--silent), or scenarios involving shared DLLs/drivers, users are left completely in the dark.
Real-World Example
Upgrading OBSProject.OBSStudio from 32.2.1 to 32.2.2 silently fails with exit code 6 when an Electron/Chromium app (such as VS Code, Discord, Slack, or Antigravity) has loaded obs-virtualcam-module64.dll via DirectShow camera device enumeration. Even if the user closes OBS Studio itself, the lock remains held by an unrelated background process. Identifying the culprit currently requires manual inspection of process modules or handles.
User Value
Displaying the locking process names and PIDs allows users to immediately identify and close the conflicting application without guesswork, without running interactive installers, and without opening external tools like Process Explorer.
Proposed technical implementation details
Proposed Architecture
- Trigger Condition:
InAppInstallerCLICore(InstallFlow.cpp/ShellExecuteInstallerHandler.cpp), execute the detection flow only when an installer returns an exit code mapped toReturnResponse::packageInUseorReturnResponse::packageInUseByApplication(e.g. exit code 6). - Process Enumeration via Windows Restart Manager:
Utilize the native Win32 Restart Manager API (rstrtmgr.h/rstrtmgr.dll):- Call
RmStartSessionto obtain a session handle. - Register the target package install path or modified files via
RmRegisterResources. - Call
RmGetListto obtain the array ofRM_PROCESS_INFOstructures (retrievingstrAppNameandProcess.dwProcessId). - Clean up with
RmEndSession.
- Call
- CLI Output Format:
Render the list of blocking processes directly in the error block:The files modified by the installer are currently being used by another application: - Antigravity (PID: 9468) Please close these applications and try again. Installer failed with exit code: '6'
- Vorherrschende Sprache
- C++
- Sterne
- 26.6k
- Forks
- 1.8k
- Ø Merge
- 3 T. 10 Std.
- Gemergte PRs (30 T.)
- 41
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/winget-cli
-
Issue-Docs Needs-Triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
microsoft/winget-cli#6692 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Issue-Docs Possible-Duplicate
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
microsoft/winget-cli#6493 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Issue-Feature
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
microsoft/winget-cli#6427 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Issue-Docs msstore
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
microsoft/winget-cli#6331 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Command-Source Issue-Bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
microsoft/winget-cli#6148 ·
Maintainer antworten meist innerhalb von 2 Tagen
Alle Issues in microsoft/winget-cli
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
stratum-mining/sv2-tp#167 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Sign up button opens the Sign in page instead of the Sign up page for Enterprise edition serversOffenauth bug ui/ux
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
MerginMaps/mobile#4795 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
HarperFast/rocksdb-js#1118 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag
-
26.04 bug dark-mode Easy Hack impress symptom: visual
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
CollaboraOnline/online#16421 · 1 Kommentar ·