packaging/windows: fix build watcher never firing, correct earlier
BTRFS misdiagnosis in README The build watcher was registered as a SYSTEM-context Scheduled Task (schtasks /ru SYSTEM). Confirmed on a real run this never actually works: Z:\ (the /shared mount) is mapped per interactive session, a SYSTEM task has no session of its own and can't see it, so watch_build.bat spun forever on its own "if not exist Z:\" wait -- a build request sat unclaimed for hours with zero indication anything was wrong. Fixed with an All-Users Startup-folder entry instead, which runs in whichever user's session actually logs in. Also correcting the README's earlier "BTRFS boot-loop" entry: that was a misdiagnosis from reading the text log alone (repeated "loading/starting Boot0004" lines). Actually looking at the noVNC screen showed genuine, progressing Windows Setup the whole time -- Setup legitimately reboots the VM multiple times, each one re-prints those same firmware lines. The chattr +C fix stays (real, independently documented dockur/QEMU/BTRFS caveat) but likely wasn't fixing an actual problem that time. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -61,12 +61,18 @@ powershell -NoProfile -Command ^
|
||||
"Expand-Archive -Path 'C:\wix311-binaries.zip' -DestinationPath 'C:\wix' -Force"
|
||||
del C:\wix311-binaries.zip
|
||||
|
||||
REM -- Register the build watcher to run at every boot from here on, plus
|
||||
REM kick it off right now too (ONSTART won't retroactively fire for this
|
||||
REM already-in-progress boot). Runs as SYSTEM so it works with no user
|
||||
REM logged in.
|
||||
call :log "registering build watcher ..."
|
||||
schtasks /create /tn "FenigmaBuildWatcher" /sc onstart /ru SYSTEM /rl HIGHEST /tr "C:\OEM\watch_build.bat" /f >> C:\OEM\install.log 2>&1
|
||||
REM -- Register the build watcher to run at every login from here on,
|
||||
REM plus kick it off right now too (a fresh login won't retroactively
|
||||
REM fire for this already-logged-in session). Deliberately an All-Users
|
||||
REM Startup-folder entry, NOT a SYSTEM-context Scheduled Task: confirmed
|
||||
REM on a real run that a /ru SYSTEM task can't see Z:\ at all and spins
|
||||
REM forever on watch_build.bat's own "if not exist Z:\" wait -- Z:\ (the
|
||||
REM /shared mount) is mapped per INTERACTIVE session, invisible to a
|
||||
REM SYSTEM task with no session of its own. Startup-folder entries run
|
||||
REM in whichever user's session actually logs in, inheriting their
|
||||
REM drive mappings correctly.
|
||||
call :log "registering build watcher (Startup folder) ..."
|
||||
copy /y C:\OEM\watch_build.bat "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\FenigmaBuildWatcher.bat" >> C:\OEM\install.log 2>&1
|
||||
start "" cmd /c C:\OEM\watch_build.bat
|
||||
|
||||
call :log "provisioning done"
|
||||
|
||||
Reference in New Issue
Block a user