mirror of
https://github.com/dockur/windows.git
synced 2026-07-27 21:42:36 +07:00
Compare commits
5 Commits
a6c1e4c8a5
...
2488d5735b
| Author | SHA1 | Date | |
|---|---|---|---|
| 2488d5735b | |||
| aa7ddb698c | |||
| 5eba2a5fed | |||
| ee97b9d628 | |||
| c36c36ca00 |
@@ -1644,6 +1644,43 @@ writeVBS() {
|
||||
return 0
|
||||
}
|
||||
|
||||
disableAutoReboot() {
|
||||
|
||||
local target="$1"
|
||||
local file
|
||||
|
||||
file=$(find \
|
||||
"$target" \
|
||||
-maxdepth 1 \
|
||||
-type f \
|
||||
-iname HIVESYS.INF \
|
||||
-print -quit
|
||||
) || return 1
|
||||
|
||||
if [ -z "$file" ]; then
|
||||
error "The file HIVESYS.INF could not be found!"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if grep -Fqi \
|
||||
'HKLM,"SYSTEM\CurrentControlSet\Control\CrashControl","AutoReboot"' \
|
||||
"$file"; then
|
||||
|
||||
sed -i -E \
|
||||
's|^(HKLM,"SYSTEM\\CurrentControlSet\\Control\\CrashControl","AutoReboot",[^,]*,)[^[:space:]]*|\1 0|I' \
|
||||
"$file" || return 1
|
||||
|
||||
else
|
||||
|
||||
printf '%s\n' \
|
||||
'HKLM,"SYSTEM\CurrentControlSet\Control\CrashControl","AutoReboot",0x00010001,0' |
|
||||
unix2dos >> "$file" || return 1
|
||||
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
legacyInstall() {
|
||||
|
||||
local dir="$2"
|
||||
@@ -1683,6 +1720,10 @@ legacyInstall() {
|
||||
addLegacyDrivers "$dir" "$target" "$driver" "$arch" "$drivers" || return 1
|
||||
fi
|
||||
|
||||
if [[ "${driver,,}" == "xp" ]]; then
|
||||
disableAutoReboot "$target" || return 1
|
||||
fi
|
||||
|
||||
setLegacyKey "$target" "$driver" "$arch" "$desc" || return 1
|
||||
validateProductKey "$KEY" || return 1
|
||||
|
||||
|
||||
+1
-1
@@ -984,7 +984,7 @@ min_severity = warning
|
||||
show_summary = false
|
||||
|
||||
[rules]
|
||||
disabled_rules = W001,W028,W041,SEC002,SEC005
|
||||
disabled_rules = W001,W025,W028,W033,W041,SEC002,SEC005
|
||||
EOC
|
||||
|
||||
output=$(
|
||||
|
||||
+33
-30
@@ -734,39 +734,40 @@ setMachine() {
|
||||
|
||||
case "${id,,}" in
|
||||
|
||||
"win9"* )
|
||||
USB="no"
|
||||
VGA="cirrus"
|
||||
DISK_TYPE="auto"
|
||||
MACHINE="pc-i440fx-2.4"
|
||||
BOOT_MODE="windows_legacy"
|
||||
[ -z "${ADAPTER:-}" ] && ADAPTER="pcnet" ;;
|
||||
|
||||
"win2k"* )
|
||||
VGA="cirrus"
|
||||
MACHINE="pc"
|
||||
USB="pci-ohci"
|
||||
DISK_TYPE="auto"
|
||||
BOOT_MODE="windows_legacy"
|
||||
[ -z "${ADAPTER:-}" ] && ADAPTER="rtl8139" ;;
|
||||
|
||||
"winxp"* | "win2003"* )
|
||||
DISK_TYPE="blk"
|
||||
BOOT_MODE="windows_legacy"
|
||||
[ -z "${SOUND:-}" ] && SOUND="usb-audio" ;;
|
||||
|
||||
"winvista"* | "win7"* | "win2008"* )
|
||||
"win9"* | "win2k"* | "winxp"* | "win2003"* | \
|
||||
"winvista"* | "win7"* | "win2008"* | "reactos" )
|
||||
BOOT_MODE="windows_legacy" ;;
|
||||
|
||||
esac
|
||||
|
||||
case "${id,,}" in
|
||||
|
||||
"win9"* )
|
||||
isQ35 && MACHINE="pc-i440fx-2.4"
|
||||
[ -z "${USB:-}" ] && USB="no"
|
||||
[ -z "${VGA:-}" ] && VGA="cirrus"
|
||||
[ -z "${ADAPTER:-}" ] && ADAPTER="pcnet"
|
||||
[ -z "${DISK_TYPE:-}" ] && DISK_TYPE="auto" ;;
|
||||
|
||||
"win2k"* )
|
||||
isQ35 && MACHINE="pc"
|
||||
[ -z "${VGA:-}" ] && VGA="cirrus"
|
||||
[ -z "${USB:-}" ] && USB="pci-ohci"
|
||||
[ -z "${ADAPTER:-}" ] && ADAPTER="rtl8139"
|
||||
[ -z "${DISK_TYPE:-}" ] && DISK_TYPE="auto" ;;
|
||||
|
||||
"winxp"* | "win2003"* )
|
||||
[ -z "${SOUND:-}" ] && SOUND="usb-audio"
|
||||
[ -z "${DISK_TYPE:-}" ] && DISK_TYPE="blk" ;;
|
||||
|
||||
"reactos" )
|
||||
VGA="cirrus"
|
||||
MACHINE="pc"
|
||||
REMOVE="N"
|
||||
REBUILD="N"
|
||||
USB="pci-ohci"
|
||||
DISK_TYPE="auto"
|
||||
BOOT_MODE="windows_legacy"
|
||||
[ -z "${ADAPTER:-}" ] && ADAPTER="rtl8139" ;;
|
||||
isQ35 && MACHINE="pc"
|
||||
[ -z "${VGA:-}" ] && VGA="cirrus"
|
||||
[ -z "${REMOVE:-}" ] && REMOVE="N"
|
||||
[ -z "${USB:-}" ] && USB="pci-ohci"
|
||||
[ -z "${REBUILD:-}" ] && REBUILD="N"
|
||||
[ -z "${ADAPTER:-}" ] && ADAPTER="rtl8139"
|
||||
[ -z "${DISK_TYPE:-}" ] && DISK_TYPE="auto" ;;
|
||||
|
||||
esac
|
||||
|
||||
@@ -788,6 +789,8 @@ setMachine() {
|
||||
|
||||
# Prevent bluescreen if 64 bit PCI hole size is >2G.
|
||||
ARGS="-global q35-pcihost.x-pci-hole64-fix=false"
|
||||
ARGS+=" -global virtio-pci.disable-modern=on"
|
||||
ARGS+=" -global virtio-pci.disable-legacy=off"
|
||||
|
||||
fi ;;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user