Skip to content

Commit 60a8347

Browse files
committed
fix(cli): unblock downloaded binaries to prevent Access Denied error
Windows SmartScreen / Defender blocks execution of downloaded .exe files that carry a Zone.Identifier (Mark of the Web) alternate data stream. This causes both "Access denied" on vp.exe itself and "Failed to download Node.js runtime: Access is denied. (os error 5)" when vp.exe tries to perform file operations while MOTW-restricted. Strip the marker with Unblock-File after copying binaries to BinDir. Closes #901 Closes #1019 Closes #1226
1 parent 0bcee16 commit 60a8347

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

packages/cli/install.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,10 @@ function Main {
350350
}
351351
}
352352

353+
# Remove Zone.Identifier (Mark of the Web) from downloaded binaries so
354+
# Windows SmartScreen / Defender won't block execution.
355+
Get-ChildItem -Path $BinDir -Filter "*.exe" | Unblock-File
356+
353357
# Generate wrapper package.json that declares vite-plus as a dependency.
354358
# pnpm will install vite-plus and all transitive deps via `vp install`.
355359
# The packageManager field pins pnpm to a known-good version.

0 commit comments

Comments
 (0)