fix: Windows XP configuration

This commit is contained in:
Kroese 2024-04-05 14:32:44 +02:00 committed by GitHub
parent 06b7c1cb6b
commit 7fd8579ee9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -768,7 +768,7 @@ prepareXP() {
find "$target" -maxdepth 1 -type f -iname winnt.sif -exec rm {} \;
{ echo "[Data]"
{ echo "[Data]"
echo "AutoPartition=1"
echo "MsDosInitiated=\"0\""
echo "UnattendedInstall=\"Yes\""
@ -794,8 +794,7 @@ prepareXP() {
echo "[GuiUnattended]"
echo "OEMSkipRegional=1"
echo "OemSkipWelcome=1"
echo "AdminPassword=\"\""
echo "EncryptedAdminPassword=\"No\""
echo "AdminPassword=*"
echo "TimeZone=0"
echo "AutoLogon=Yes"
echo "AutoLogonCount=65432"
@ -826,16 +825,27 @@ prepareXP() {
echo "AllowConnections=1"
} | unix2dos > "$target/WINNT.SIF"
{ echo "Windows Registry Editor Version 5.00"
{ echo "Windows Registry Editor Version 5.00"
echo ""
echo "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security]"
echo "\"FirewallDisableNotify\"=dword:00000001"
echo "\"UpdatesDisableNotify\"=dword:00000001"
echo "\"AntiVirusDisableNotify\"=dword:00000001"
echo ""
echo "[HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\WindowsFirewall\StandardProfile]"
echo "\"EnableFirewall\"=dword:00000000"
echo ""
echo "[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess]"
echo "\"Start\"=dword:00000004"
echo
echo "[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List]"
echo "\"3389:TCP\"=\"3389:TCP:*:Enabled:@xpsp2res.dll,-22009\""
echo ""
echo "[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]"
echo "\"LimitBlankPasswordUse\"=dword:00000000"
echo ""
echo "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]"
echo "\"AllowMultipleTSSessions\"=dword:00000000"
echo "[HKEY_USERS\.DEFAULT\Control Panel\Desktop]"
echo "\"ScreenSaveActive\"=\"0\""
echo ""
echo "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]"
echo "\"DefaultUserName\"=\"Docker\""
@ -845,8 +855,25 @@ prepareXP() {
echo "\"AutoAdminLogon\"=\"1\""
} | unix2dos > "$dir/\$OEM\$/install.reg"
{ echo "[COMMANDS]"
echo "regedt32 /s install.reg"
{ echo "On Error Resume Next"
echo ""
echo "strComputer = \".\""
echo ""
echo "Set WshShell = WScript.CreateObject(\"WScript.Shell\")"
echo "Set WshNetwork = WScript.CreateObject(\"WScript.Network\")"
echo "Set oReg=GetObject(\"winmgmts:{impersonationLevel=impersonate}!\\\\\" & \".\" & \"\root\default:StdRegProv\")"
echo ""
echo "strComputer = WshNetwork.ComputerName"
echo ""
echo "'Rename Administrator"
echo "Set oMachine = GetObject(\"WinNT://\" & strComputer)"
echo "Set oInfoUser = GetObject(\"WinNT://\" & strComputer & \"/Administrator,user\")"
echo "set oUser = oMachine.MoveHere(oInfoUser.ADsPath,\"Docker\")"
} | unix2dos > "$dir/\$OEM\$/admin.vbs"
{ echo "[COMMANDS]"
echo "\"REGEDIT /s install.reg\""
echo "\"Wscript admin.vbs\""
} | unix2dos > "$dir/\$OEM\$/cmdlines.txt"
rm -rf "$drivers"