Skip to content

[BUG] Installation of v.0.21 failed on MS-managed Windows 11 PC. Even in running Terminal "as administrator" #1874

Description

@webmaxru

Describe the bug
Installation failed on MS-managed Windows 11 PC. Even in running Terminal "as administrator"

To Reproduce
Steps to reproduce the behavior:

  1. Run command 'irm https://aka.ms/apm-windows | iex'
  2. With parameters N/A
  3. See error
    The OS denied execution of C:\Users\masalnik\AppData\Local\Programs\apm\releases\v0.21.0.new-0646d253206e411aaf6f0911687adbaa\apm.exe.

Expected behavior
A clear and concise description of what you expected to happen.

Environment (please complete the following information):

  • OS: [Windows]
  • Python Version: [e.g. 3.12.0]
  • APM Version: [0.21.0]

Logs

irm https://aka.ms/apm-windows | iex

===========================================================
                    APM Installer
             The NPM for AI-Native Development
===========================================================

Fetching latest release information...
Latest version: v0.21.0
Downloading apm-windows-x86_64.zip (v0.21.0)...
Download successful
Verifying download checksum...
Checksum verified
Extracting package...
Testing binary...
Downloaded binary failed to run: Program 'apm.exe' failed to run: Access is deniedAt line:813 char:23
+         $testOutput = & $stagedExe --version 2>&1
+                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~.

The OS denied execution of C:\Users\masalnik\AppData\Local\Programs\apm\releases\v0.21.0.new-0646d253206e411aaf6f0911687adbaa\apm.exe.
This is the standard signature of an enterprise application control policy
(AppLocker or App Control for Business / WDAC) denying an unsigned binary
from a user-writable path.

Options to unblock:
  1. Ask your endpoint admin to allow-list the final install path
     (C:\Users\masalnik\AppData\Local\Programs\apm\releases\v0.21.0) via an AppLocker/WDAC Path or Publisher rule.
  2. Set APM_TEMP_DIR to a directory your policy permits, then retry:
       $env:APM_TEMP_DIR = "$env:LOCALAPPDATA\Programs\apm\tmp"
  3. Install via pip into your user site:
       pip install --user apm-cli

Attempting automatic fallback to pip...
Attempting installation via pip (python3)...
pip install failed: System.Management.Automation.RemoteException

Manual installation options:
  1. pip (recommended): pip install --user apm-cli
  2. From source:
     git clone https://github.com/microsoft/apm.git
     cd apm && uv sync && uv run pip install -e .

Need help? Create an issue at: https://github.com/microsoft/apm/issues

[process exited with code 1 (0x00000001)]
You can now close this terminal with Ctrl+D, or press Enter to restart.

Additional context

  • Applying APM_TEMP_DIR solution did not change behaviour
  • Installing via pip did not help as I have v0.15.0 version as Windows app and apm alias points to it

What helped - manual download of released version, allowing it to run in Windows protection system, and rewiring apm alias. Would be great to have installer covering "allow to run" by invoking respective system dialogue (if it's technically possible)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/distributionInstallers (curl/PowerShell/Brew/Scoop), self-update, devcontainer, codespaces.area/enterpriseAir-gapped/GHE configurability, registry proxy, rulesets, adoption playbook.priority/highShips in current or next milestonestatus/acceptedDirection approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).theme/portabilityOne manifest, every target. Multi-target deploy, marketplace, packaging, install.type/bugSomething does not work as documented.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions