Skip to content

Commit

Permalink
feat: Improve Windows XP configuration (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese authored Apr 5, 2024
1 parent 7921b1e commit b02f65a
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM scratch
COPY --from=qemux/qemu-docker:4.19 / /
COPY --from=qemux/qemu-docker:4.20 / /

ARG DEBCONF_NOWARNINGS "yes"
ARG DEBIAN_FRONTEND "noninteractive"
Expand Down
59 changes: 56 additions & 3 deletions src/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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\""
Expand Down Expand Up @@ -811,10 +811,12 @@ prepareXP() {
echo "[Networking]"
echo "InstallDefaultComponents=Yes"
echo ""
echo "[Branding]"
echo "BrandIEUsingUnattended=Yes"
echo ""
echo "[URL]"
echo "Home_Page = http://www.google.com"
echo "Search_Page = http://www.google.com/ie_rsearch.html"
echo "AutoConfig = 0"
echo "Search_Page = http://www.google.com"
echo ""
echo "[RegionalSettings]"
echo "Language=00000409"
Expand All @@ -823,6 +825,57 @@ prepareXP() {
echo "AllowConnections=1"
} | unix2dos > "$target/WINNT.SIF"

{ echo "Windows Registry Editor Version 5.00"
echo ""
echo "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Security]"
echo "\"FirstRunDisabled\"=dword:00000001"
echo "\"AntiVirusOverride\"=dword:00000001"
echo "\"FirewallOverride\"=dword:00000001"
echo "\"FirewallDisableNotify\"=dword:00000001"
echo "\"UpdatesDisableNotify\"=dword:00000001"
echo "\"AntiVirusDisableNotify\"=dword:00000001"
echo ""
echo "[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wscsvc]"
echo "\"Start\"=dword:00000004"
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_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Tour]"
echo "\"RunCount\"=dword:00000000"
echo ""
echo "[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]"
echo "\"HideFileExt\"=dword:00000000"
echo ""
echo "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]"
echo "\"DefaultUserName\"=\"Docker\""
echo "\"DefaultDomainName\"=\"Dockur\""
echo "\"AltDefaultUserName\"=\"Docker\""
echo "\"AltDefaultDomainName\"=\"Dockur\""
echo "\"AutoAdminLogon\"=\"1\""
} | unix2dos > "$dir/\$OEM\$/install.reg"

{ echo "Set WshShell = WScript.CreateObject(\"WScript.Shell\")"
echo "Set WshNetwork = WScript.CreateObject(\"WScript.Network\")"
echo "Set oMachine = GetObject(\"WinNT://\" & WshNetwork.ComputerName)"
echo "Set oInfoUser = GetObject(\"WinNT://\" & WshNetwork.ComputerName & \"/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"
return 0
}
Expand Down

0 comments on commit b02f65a

Please sign in to comment.