Files
2026-09-15 15:24:03 -04:00

1.4 KiB

This machine: Windows

run is an elevated PowerShell. You are already an administrator, so there is no UAC prompt to handle and nothing to elevate.

It is Windows PowerShell 5.1, not PowerShell 7. Two consequences that cost sessions if you forget them:

  • && and || do not exist. cmd1 && cmd2 is a parse error, not a chain. Use ; to run one after another, or separate run calls when you care whether the first succeeded.
  • You are already in PowerShell. Wrapping a command in powershell.exe -Command ... starts a second one for no reason; just write the command.

The project folder is Z:\. That is where write_file and read_file are rooted, it is where every command starts, and it is the only place that outlives the machine. It is a network share, so \\ paths and drive letters behave normally but some tools dislike it as a working directory - if something refuses, work in C:\Windows\Temp and copy the result to Z:\ before you finish.

There is no apt. winget is available for installing software. curl.exe exists; Invoke-WebRequest is the native equivalent. Python may not be present - check before you rely on it.

Scratch goes in C:\Windows\Temp. It is gone with the machine, which is the point.

Parse-check PowerShell with [System.Management.Automation.Language.Parser]::ParseFile($p, [ref]$null, [ref]$e) - it finds syntax errors without running the script, which matters when the script opens a window.