[Bug]: wix/MSI installer with manifest Scope: machine is invoked without ALLUSERS=1, dual-purpose MSI aborts in LaunchConditions (1603 -> 0x8a150049)

Aberta
#6,681 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 2 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
28/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
cpp

Direção de pesquisa

The failing step is the MSI launch-condition check, and the log points at Workflows/InstallFlow.cpp:239 where the installer args are built. First check whether the code maps manifest Scope: machine to ALLUSERS=1 for msi/wix installers, and whether the installer switches from the manifest are merged in. Done means either a maintainer-confirmed decision that Scope should imply ALLUSERS=1, or a documented manifest-side workaround, so this needs a maintainer decision before code changes.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Needs-Triage
Environment
Windows Package Manager v1.29.380
Windows: Windows.Desktop v10.0.26300.9818
Package: Microsoft.DesktopAppInstaller v1.29.380.0
Package involved
Steps to reproduce
  1. Have ArtCraft.WordCraft installed machine-wide (on this machine: 0.16.0, ProductCode {808C7146-64C9-4948-9F39-41F1C9857E20}).
  2. Run winget upgrade --id ArtCraft.WordCraft.
Expected behavior

The upgrade to 0.18.1 is performed as a machine-wide install, consistent with the existing installation and with Scope: machine in the manifest.

Actual behavior

winget upgrade fails with 0x8a150049 (APPINSTALLER_CLI_ERROR_INSTALLER_FAILED).

winget diagnostic log (WinGet-2026-11-13-16-01-09.412.log):

<I> Found existing installer file at '...\Temp\WinGet\ArtCraft.WordCraft.0.18.1\wordcraft-0.18.1-windows-x64.msi'. Verifying file hash.
<I> Existing installer file hash matches. Will use existing installer.
<I> Installer hash verified
<I> Installer args: /quiet /norestart /log "...\ArtCraft.WordCraft.0.18.1-26-11-13-16-01-14.log"
<E> MsiInstallProduct installer failed: 1603
<E> Terminating context: 0x8a150049 at ...\Workflows\InstallFlow.cpp:239

Installer log (ArtCraft.WordCraft.0.18.1-26-11-13-16-01-14.log):

Product: WordCraft -- This app is already installed for everyone. Choose Everyone to update it, or
pass ALLUSERS=1 to msiexec. Uninstall that copy before changing who it is installed for.
Action ended 16:01:15: LaunchConditions. Return value 3.
Property(S): MSIINSTALLPERUSER = 1
Property(S): CRAFT_SCOPE = user
Property(S): CRAFT_MACHINE_DIR = C:\Program Files\WordCraft\
Property(S): ProgramFiles64Folder = C:\Users\<user>\AppData\Local\Programs\
安装成功或错误状态: 1603

Note: the file hash was verified successfully, so this is not an installer hash mismatch — the failure is inside the MSI, in LaunchConditions.

MSI internals (read-only via WindowsInstaller COM)
ALLUSERS = 2
MSIINSTALLPERUSER = 1
CRAFT_SCOPE = user

LaunchCondition:
  [Installed OR ALLUSERS <> 1 OR NOT CRAFT_USER_DIR]
    -> "This app is already installed for your account. Choose Only for me to update it..."
  [Installed OR ALLUSERS = 1 OR NOT CRAFT_MACHINE_DIR]
    -> "This app is already installed for everyone. Choose Everyone to update it, or pass ALLUSERS=1..."
  [NOT WIX_DOWNGRADE_DETECTED]
    -> "A newer version of WordCraft is already installed."

So this is a WiX dual-purpose MSI (ALLUSERS=2) whose default resolves to per-user (MSIINSTALLPERUSER=1). Because the machine already has a machine-wide copy, the second launch condition requires ALLUSERS=1.

Passing ALLUSERS=1 explicitly works: msiexec /i <msi> /qn /norestart ALLUSERS=1 returns 0, and the ARP entry becomes {35218007-C526-4F81-AFED-5C5473D70655} = 0.18.1 in HKLM.

Question / suspected bug

The manifest declares Scope: machine, yet the recorded installer args contain no ALLUSERS=1, and the MSI resolved to MSIINSTALLPERUSER=1 and per-user paths (ProgramFiles64Folder redirected to %LOCALAPPDATA%\Programs). I could not find any place in winget-cli where the manifest Scope value is translated into ALLUSERS=1 / MSIINSTALLPERUSER=1 for msi/wix installers, so for dual-purpose MSIs Scope: machine appears to be metadata only and the install falls back to the MSI's per-user default.

If this is by design, what is the supported manifest-side fix — InstallerSwitches: Custom: ALLUSERS=1 for the wix installer? If so I can send a winget-pkgs PR. If it is not by design, then Scope: machine should probably imply ALLUSERS=1 for MSI/wix installers.

Related package (same publisher, same pattern)

ArtCraft.PhotoCraft 0.21.0 has the same installer design and its manifest also declares Scope: machine. It failed identically on 2026-11-11 with 1603 and the same LaunchCondition message in three attempts:
ArtCraft.PhotoCraft.0.21.0-26-11-11-14-44-39.log, ...-14-44-43.log, ...-15-01-36.log.

Linguagem predominante
C++
Estrelas
26.6k
Forks
1.8k
Merge médio
3d 10h
PRs com merge (30d)
41

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de microsoft/winget-cli

Todas as issues de microsoft/winget-cli

Issues semelhantes

Mais issues de C++

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.