Enumerate and display blocking processes when installer exits with packageInUse / packageInUseByApplication
Les mainteneurs répondent en général sous 2 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 55/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- cpp
- Domaine
- cli, operating-systems
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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'
- Langage dominant
- C++
- Étoiles
- 26.6k
- Forks
- 1.8k
- Merge moyen
- 3 j 10 h
- PR mergées (30 j)
- 41
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de microsoft/winget-cli
-
Issue-Docs Needs-Triage
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
microsoft/winget-cli#6692 ·
Les mainteneurs répondent en général sous 2 jours
-
Issue-Docs Possible-Duplicate
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
microsoft/winget-cli#6493 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
-
WinGetSourceCreator: PackWithMappingFile should verify makeappx.exe exists before invoking itOuverteIssue-Feature
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
microsoft/winget-cli#6427 ·
Les mainteneurs répondent en général sous 2 jours
-
Issue-Docs msstore
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
microsoft/winget-cli#6331 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
-
Command-Source Issue-Bug
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
microsoft/winget-cli#6148 ·
Les mainteneurs répondent en général sous 2 jours
Toutes les issues de microsoft/winget-cli
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
stratum-mining/sv2-tp#167 ·
Les mainteneurs répondent en général sous 1 jour
-
Sign up button opens the Sign in page instead of the Sign up page for Enterprise edition serversOuverteauth bug ui/ux
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
MerginMaps/mobile#4795 ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
HarperFast/rocksdb-js#1118 ·
Les mainteneurs répondent en général sous 1 jour
-
bug triage
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 1 jour
-
26.04 bug dark-mode Easy Hack impress symptom: visual
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
CollaboraOnline/online#16421 · 1 commentaire ·