Files
SilverMetal/windows/installer/oem/SetupComplete.cmd

25 lines
1.1 KiB
Batchfile

@echo off
REM ===========================================================================
REM SilverMetal Enhanced - Windows : first-boot entry point.
REM Windows runs %WINDIR%\Setup\Scripts\SetupComplete.cmd automatically (as
REM SYSTEM) at the end of setup. It hands off to Invoke-Hardening.ps1 via -File
REM to avoid cmd/PowerShell quoting fragility (an inline -Command one-liner
REM here previously failed to parse, so the §A-H modules never ran).
REM
REM Design: ../../iso-builder.md Controls: ../../hardening-spec.md
REM ===========================================================================
set LOG=C:\Windows\Setup\Scripts\silvermetal-firstboot.log
set HARD=C:\Windows\Setup\Scripts\hardening
echo [%DATE% %TIME%] SilverMetal first-boot start >> "%LOG%"
if exist "C:\Program Files\SilverOS\Welcome\SilverOS.Welcome.App.exe" (
echo [%DATE% %TIME%] hardening deferred to SilverOS Welcome >> "%LOG%"
) else (
powershell -NoProfile -ExecutionPolicy Bypass -File "%HARD%\Invoke-Hardening.ps1" >> "%LOG%" 2>&1
)
echo [%DATE% %TIME%] SilverMetal first-boot done >> "%LOG%"
exit /b 0