elevated would configure the *administrator's* profile instead of yours.
What this installs / configures:
+ - %USERPROFILE%\.local\bin on the user PATH: where Claude Code's native
+ installer puts claude.exe, and nothing else guarantees it is on the PATH
- WinMerge on the user PATH (x64 only)
- vswhere.exe on the user PATH: the Visual Studio installer puts it in
%ProgramFiles(x86)%\Microsoft Visual Studio\Installer, which nothing adds
}
}
+function Add-LocalBinToUserPath {
+ # %USERPROFILE%\.local\bin is where Claude Code's native installer puts
+ # claude.exe (see setup-windows.bat). The installer only prints a reminder
+ # when the directory is not on the PATH, and it is the per-user bin
+ # directory other tools reach for too, so put it there regardless and create
+ # it if it is missing - an entry for a directory that is not there yet would
+ # only be dead until something fills it.
+ Write-Step '%USERPROFILE%\.local\bin on the user PATH'
+ $dir = Join-Path $env:USERPROFILE '.local\bin'
+ if (-not (Test-Path $dir)) {
+ New-Item -ItemType Directory -Path $dir | Out-Null
+ Write-Host " Created $dir."
+ }
+ Add-ToUserPath $dir
+}
+
function Add-WinMergeToUserPath {
Write-Step 'WinMerge on the user PATH'
$candidates = @(
# ArchAudit last on purpose: it reports on what the steps before it (and the
# winget installs in setup-windows.bat) actually put on the box.
$steps = @{
+ LocalBinPath = { Add-LocalBinToUserPath }
WinMergePath = { Add-WinMergeToUserPath }
VsWhere = { Add-VsWhereToUserPath }
BinSkim = { Install-BinSkim }
# step of the same name; still accepted.
$plan = @(Resolve-SetupSelection -Steps $catalog `
-Only $(if ($PSBoundParameters.ContainsKey('Only')) { $Only } else { $null }) -Skip $Skip `
- -Aliases @{ WinMerge = 'WinMergePath' } -IsArm64 $IsArm64)
+ -Aliases @{ WinMerge = 'WinMergePath' } -IsArm64 $IsArm64 `
+ -VirtualMachine (Get-SetupVirtualMachine))
Write-SetupPlan $plan 'Plan for setup-windows-no-uac.ps1'
$runCount = @($plan | Where-Object Selected).Count
if ($runCount -eq 0) {