Docs  /  Windows boot + Safe Mode (Application DLLs)

Windows boot + Safe Mode (Application DLLs)

Scripts under tools\boot\:

Script Role
Install_AI_WindowsBoot_SafeMode.bat Admin installer: service + SafeBoot keys + optional Run key
AI_SafeMode_Boot.bat Launcher: PATH → Application DLLs, detect Safe Mode, start resident
Uninstall_AI_WindowsBoot_SafeMode.bat Removes service / registry

Why Safe Mode needs extra steps

By default Windows Safe Mode does not start normal Run-key apps or most third-party services. To run _AugmentedIntelligence in Safe Mode you must:

  1. Run as a Windows service (or other SafeBoot-allowed component).
  2. Register that service under:
HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\<ServiceName>
HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\Network\<ServiceName>

Default value: Service.

  1. Load Application DLLs from a known directory (Safe Mode has a minimal PATH).

Install (once, elevated)

  1. Deploy a runtime tree (recommended):
.\installer\install.ps1 -Phase deploy
# Default runtime: C:\_AugmentedIntelligence\Application\ + Dependencies\
  1. Run as Administrator:
tools\boot\Install_AI_WindowsBoot_SafeMode.bat

Or point at a custom root:

tools\boot\Install_AI_WindowsBoot_SafeMode.bat /RUNTIME "C:\_AugmentedIntelligence"

What gets registered

Item Purpose
Service AugmentedIntelligence Auto-start on boot; allowed in Minimal and Network Safe Mode
HKLM\...\Run\AugmentedIntelligence Normal interactive logon also runs the launcher
%ProgramData%\AugmentedIntelligence\boot\Start_AI_Boot.bat Local copy (works even if E: is offline in Safe Mode)

Uninstall:

tools\boot\Install_AI_WindowsBoot_SafeMode.bat /UNINSTALL

How DLLs load in Safe Mode

AI_SafeMode_Boot.bat does:

cd /d "%APP_DIR%"
set PATH=%APP_DIR%;%Dependencies%;%SystemRoot%\System32;...
start ... _AugmentedIntelligence.exe --profile offline_local --resident ...

Side-by-side DLLs next to the EXE (as in installer\payload\Application\) are found first.
Install the x64 VC++ Redistributable so vcruntime140.dll / msvcp140.dll exist under System32 (Safe Mode always has System32).

CUDA / GPU DLLs often fail in Minimal Safe Mode (no NVIDIA driver stack). That is expected; the boot script uses profile offline_local in Safe Mode.

Boot Profile (default) MySQL
Normal default --settings-mysql-primary
Safe Minimal offline_local file-primary settings
Safe Network offline_local MySQL primary if LAN/MySQL available

Override via env before launch: AI_SAFE_PROFILE, AI_NORMAL_PROFILE, AI_RUNTIME_ROOT.

Test without rebooting

%ProgramData%\AugmentedIntelligence\boot\Start_AI_Boot.bat
sc start AugmentedIntelligence
type %ProgramData%\AugmentedIntelligence\boot.log

Enter Safe Mode

  • Settings → System → Recovery → Advanced startup, or
  • shutdown /r /o /f /t 0
  • Prefer Safe Mode with Networking if agents need MySQL on another host.

Limitations

Topic Note
Session 0 isolation Service-started process is not an interactive desktop ImGui session; uses --resident
GPU / CUDA Not available in typical Safe Mode
Full feature set Use normal boot for vision/GPU/train; Safe Mode is for recovery / resident / repair
Domain AD Boot sets AI_SKIP_AD_CHECK=1 so policy can still allow local recovery
Generated from the project markdown docs on 2026-07-24. This is a static, self-contained site.