Compare commits

...

2 Commits

Author SHA1 Message Date
renovate[bot] 3735a26629 chore(deps): update hadolint/hadolint-action action to v3.5.0 2026-08-25 01:35:50 +00:00
Kroese cf3772768e feat: Reduce XP and 2003 recovery menu timeout (#2187) 2026-08-25 03:35:29 +02:00
2 changed files with 34 additions and 1 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ jobs:
-e SC2317 -e SC2317
- -
name: Lint Dockerfile name: Lint Dockerfile
uses: hadolint/hadolint-action@v3.4.0 uses: hadolint/hadolint-action@v3.5.0
with: with:
dockerfile: Dockerfile dockerfile: Dockerfile
ignore: DL3006,DL3008,DL3067 ignore: DL3006,DL3008,DL3067
+33
View File
@@ -1077,6 +1077,39 @@ writeVBS() {
} | unix2dos > "$dir/\$OEM\$/install.vbs" || return 1 } | unix2dos > "$dir/\$OEM\$/install.vbs" || return 1
if [[ "$driver" == "xp" || "$driver" == "2k3" ]]; then if [[ "$driver" == "xp" || "$driver" == "2k3" ]]; then
# Windows XP and Server 2003 store the automatic recovery menu timeout
# in byte 0x09 of bootstat.dat. Patch only that byte and leave the boot
# success/shutdown state in the rest of the file untouched.
{
printf '%s\n' \
'On Error Resume Next' \
'BootStatPath = WshShell.ExpandEnvironmentStrings("%SystemRoot%\bootstat.dat")' \
'Set BootStatStream = WScript.CreateObject("ADODB.Stream")' \
'Set BootStatXML = WScript.CreateObject("Msxml2.DOMDocument.3.0")' \
'Set BootStatByte = BootStatXML.CreateElement("byte")' \
'BootStatByte.DataType = "bin.base64"' \
'BootStatByte.Text = "Aw=="' \
'If IsObject(BootStatStream) And IsObject(BootStatByte) Then' \
' BootStatStream.Type = 1' \
' BootStatStream.Open' \
' Err.Clear' \
' BootStatStream.LoadFromFile BootStatPath' \
' If Err.Number = 0 Then' \
' If BootStatStream.Size > 9 Then' \
' BootStatStream.Position = 9' \
' BootStatStream.Write BootStatByte.NodeTypedValue' \
' BootStatStream.SaveToFile BootStatPath, 2' \
' End If' \
' End If' \
' BootStatStream.Close' \
'End If' \
'Set BootStatByte = Nothing' \
'Set BootStatXML = Nothing' \
'Set BootStatStream = Nothing' \
'On Error GoTo 0' \
''
} | unix2dos >> "$dir/\$OEM\$/install.vbs" || return 1
mkdir -p "$(dirname "$power")" || return 1 mkdir -p "$(dirname "$power")" || return 1
{ {