feat: Skip internet connection wizard on Windows 2000

This commit is contained in:
Kroese 2025-04-14 13:43:36 +02:00 committed by GitHub
parent a1e68622e9
commit dbbddb0068
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1315,11 +1315,19 @@ prepareInstall() {
if [ -n "$setup" ]; then if [ -n "$setup" ]; then
pid=$(<"$setup") pid=$(<"$setup")
pid="${pid:(-4)}"
pid="${pid:0:3}"
if [[ "$pid" == "270" ]]; then if [[ "$driver" == "2k" ]]; then
warn "this version of $desc requires a volume license key (VLK), it will ask for one during installation."
echo "${pid:0:$((${#pid})) - 4}270" > "$setup"
else
pid="${pid:(-4)}"
if [[ "${pid:0:3}" == "270" ]]; then
warn "this version of $desc requires a volume license key (VLK), it will ask for one during installation."
fi
fi fi
fi fi
@ -1376,13 +1384,14 @@ prepareInstall() {
"2k" ) "2k" )
# Windows 2000 Professional x86 generic key KEY="" ;;
KEY="G74HG-XXQTJ-RTX64-QKP3F-HKHXP" ;;
* ) error "Unknown version: \"$driver\"" && return 1 ;; * ) error "Unknown version: \"$driver\"" && return 1 ;;
esac esac
[ -n "$KEY" ] && KEY="ProductID=$KEY"
find "$target" -maxdepth 1 -type f -iname winnt.sif -exec rm {} \; find "$target" -maxdepth 1 -type f -iname winnt.sif -exec rm {} \;
{ echo "[Data]" { echo "[Data]"
@ -1420,7 +1429,7 @@ prepareInstall() {
echo " FullName=\"$username\"" echo " FullName=\"$username\""
echo " ComputerName=\"*\"" echo " ComputerName=\"*\""
echo " OrgName=\"Windows for Docker\"" echo " OrgName=\"Windows for Docker\""
echo " ProductID=$KEY" echo " $KEY"
echo "" echo ""
echo "[Identification]" echo "[Identification]"
echo " JoinWorkgroup = WORKGROUP" echo " JoinWorkgroup = WORKGROUP"
@ -1479,6 +1488,10 @@ prepareInstall() {
echo "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]" echo "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer]"
echo "\"NoWelcomeScreen\"=\"1\"" echo "\"NoWelcomeScreen\"=\"1\""
echo "" echo ""
echo "[HKEY_CURRENT_USER\Software\Microsoft\Internet Connection Wizard]"
echo "\"Completed\"=\"1\""
echo "\"Desktopchanged\"=\"1\""
echo ""
echo "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]" echo "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]"
echo "\"AutoAdminLogon\"=\"1\"" echo "\"AutoAdminLogon\"=\"1\""
echo "\"DefaultUserName\"=\"$username\"" echo "\"DefaultUserName\"=\"$username\""
@ -1502,11 +1515,18 @@ prepareInstall() {
echo "" echo ""
} | unix2dos > "$dir/\$OEM\$/install.reg" } | unix2dos > "$dir/\$OEM\$/install.reg"
if [[ "$driver" == "2k" ]]; then
{ echo "[HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Runonce]"
echo "\"^SetupICWDesktop\"=-"
echo ""
} | unix2dos >> "$dir/\$OEM\$/install.reg"
fi
if [[ "$driver" == "2k3" ]]; then if [[ "$driver" == "2k3" ]]; then
{ echo "[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\srvWiz]" { echo "[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\srvWiz]"
echo "@=dword:00000000" echo "@=dword:00000000"
echo "" echo ""
echo "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ServerOOBE\SecurityOOBE]" echo "[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\ServerOOBE\SecurityOOBE]"
echo "\"DontLaunchSecurityOOBE\"=dword:00000000" echo "\"DontLaunchSecurityOOBE\"=dword:00000000"
echo "" echo ""
} | unix2dos >> "$dir/\$OEM\$/install.reg" } | unix2dos >> "$dir/\$OEM\$/install.reg"