mirror of
https://github.com/dockur/windows.git
synced 2026-08-24 15:48:59 +01:00
feat: Disable menu animations on NT5 and Win9x (#2177)
This commit is contained in:
+14
-4
@@ -2100,7 +2100,8 @@ writeWin9xAnswerFile() {
|
|||||||
'[Install]' \
|
'[Install]' \
|
||||||
"CopyFiles=$copyFiles" \
|
"CopyFiles=$copyFiles" \
|
||||||
"UpdateInis=$updateInis" \
|
"UpdateInis=$updateInis" \
|
||||||
"AddReg=$addReg"
|
"AddReg=$addReg" \
|
||||||
|
'BitReg=Win9x.DisableAnimationsDefault'
|
||||||
|
|
||||||
if [ -n "$installDelReg" ]; then
|
if [ -n "$installDelReg" ]; then
|
||||||
printf '%s\n' "DelReg=$installDelReg"
|
printf '%s\n' "DelReg=$installDelReg"
|
||||||
@@ -2189,7 +2190,8 @@ writeWin9xAnswerFile() {
|
|||||||
printf '%s\n' \
|
printf '%s\n' \
|
||||||
'' \
|
'' \
|
||||||
'[Win9x.FirstLogon]' \
|
'[Win9x.FirstLogon]' \
|
||||||
"AddReg=$firstLogonAddReg"
|
"AddReg=$firstLogonAddReg" \
|
||||||
|
'BitReg=Win9x.DisableAnimations'
|
||||||
|
|
||||||
if [ -n "$firstLogonDelReg" ]; then
|
if [ -n "$firstLogonDelReg" ]; then
|
||||||
printf '%s\n' "DelReg=$firstLogonDelReg"
|
printf '%s\n' "DelReg=$firstLogonDelReg"
|
||||||
@@ -2480,7 +2482,7 @@ writeWin9xUserRegistry() {
|
|||||||
'HKU,".DEFAULT\Control Panel\Desktop","SCRNSAVE.EXE",,""' \
|
'HKU,".DEFAULT\Control Panel\Desktop","SCRNSAVE.EXE",,""' \
|
||||||
'HKU,".DEFAULT\Control Panel\Desktop","ScreenSaveActive",,"0"' \
|
'HKU,".DEFAULT\Control Panel\Desktop","ScreenSaveActive",,"0"' \
|
||||||
'HKU,".DEFAULT\Control Panel\Desktop","DragFullWindows",,"1"' \
|
'HKU,".DEFAULT\Control Panel\Desktop","DragFullWindows",,"1"' \
|
||||||
'HKU,".DEFAULT\Control Panel\Desktop","MenuShowDelay",,"100"' \
|
'HKU,".DEFAULT\Control Panel\Desktop","MenuShowDelay",,"0"' \
|
||||||
'HKU,".DEFAULT\Control Panel\Desktop","FontSmoothing",,"1"' \
|
'HKU,".DEFAULT\Control Panel\Desktop","FontSmoothing",,"1"' \
|
||||||
'HKU,".DEFAULT\Control Panel\Desktop","SmoothScroll",0x00010001,0' \
|
'HKU,".DEFAULT\Control Panel\Desktop","SmoothScroll",0x00010001,0' \
|
||||||
'HKU,".DEFAULT\Control Panel\Desktop\WindowMetrics","MinAnimate",,"0"' \
|
'HKU,".DEFAULT\Control Panel\Desktop\WindowMetrics","MinAnimate",,"0"' \
|
||||||
@@ -2506,7 +2508,7 @@ writeWin9xUserRegistry() {
|
|||||||
'HKCU,"Control Panel\Desktop","SCRNSAVE.EXE",,""' \
|
'HKCU,"Control Panel\Desktop","SCRNSAVE.EXE",,""' \
|
||||||
'HKCU,"Control Panel\Desktop","ScreenSaveActive",,"0"' \
|
'HKCU,"Control Panel\Desktop","ScreenSaveActive",,"0"' \
|
||||||
'HKCU,"Control Panel\Desktop","DragFullWindows",,"1"' \
|
'HKCU,"Control Panel\Desktop","DragFullWindows",,"1"' \
|
||||||
'HKCU,"Control Panel\Desktop","MenuShowDelay",,"100"' \
|
'HKCU,"Control Panel\Desktop","MenuShowDelay",,"0"' \
|
||||||
'HKCU,"Control Panel\Desktop","FontSmoothing",,"1"' \
|
'HKCU,"Control Panel\Desktop","FontSmoothing",,"1"' \
|
||||||
'HKCU,"Control Panel\Desktop","SmoothScroll",0x00010001,0' \
|
'HKCU,"Control Panel\Desktop","SmoothScroll",0x00010001,0' \
|
||||||
'HKCU,"Control Panel\Desktop\WindowMetrics","MinAnimate",,"0"' \
|
'HKCU,"Control Panel\Desktop\WindowMetrics","MinAnimate",,"0"' \
|
||||||
@@ -2525,6 +2527,14 @@ writeWin9xUserRegistry() {
|
|||||||
'HKCU,"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","StartMenuLogOff",0x00010001,1'
|
'HKCU,"Software\Microsoft\Windows\CurrentVersion\Policies\Explorer","StartMenuLogOff",0x00010001,1'
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
printf '%s\n' \
|
||||||
|
'' \
|
||||||
|
'[Win9x.DisableAnimationsDefault]' \
|
||||||
|
'HKU,".DEFAULT\Control Panel\Desktop","UserPreferencesMask",0,0x02,0' \
|
||||||
|
'' \
|
||||||
|
'[Win9x.DisableAnimations]' \
|
||||||
|
'HKCU,"Control Panel\Desktop","UserPreferencesMask",0,0x02,0'
|
||||||
}
|
}
|
||||||
|
|
||||||
writeWin9xMachineRegistry() {
|
writeWin9xMachineRegistry() {
|
||||||
|
|||||||
+42
-5
@@ -160,9 +160,10 @@ SIFInstall() {
|
|||||||
"$product" "$sifHost" "$sifUsername" "$sifPassword" "$sifOrganization" "$sifWorkgroup" \
|
"$product" "$sifHost" "$sifUsername" "$sifPassword" "$sifOrganization" "$sifWorkgroup" \
|
||||||
"$localeID" "$inputLocaleID" "$keyboardID" "$timezone" || return 1
|
"$localeID" "$inputLocaleID" "$keyboardID" "$timezone" || return 1
|
||||||
|
|
||||||
writeRegistry "$dir" "$shortcut" "$oem" "$regUsername" "$regPassword" || return 1
|
writeRegistry "$dir" "$shortcut" "$oem" "$regUsername" "$regPassword" "$driver" || return 1
|
||||||
|
|
||||||
appendRegistry "$dir" "$driver" || return 1
|
appendRegistry "$dir" "$driver" || return 1
|
||||||
|
writeNT5Effects "$dir" || return 1
|
||||||
writeVBS "$dir" "$username" "$shortcut" "$driver" || return 1
|
writeVBS "$dir" "$username" "$shortcut" "$driver" || return 1
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
@@ -748,6 +749,9 @@ writeSIF() {
|
|||||||
local inputLocaleID="${10}"
|
local inputLocaleID="${10}"
|
||||||
local keyboardID="${11}"
|
local keyboardID="${11}"
|
||||||
local timezone="${12}"
|
local timezone="${12}"
|
||||||
|
local bitsPerPel=32
|
||||||
|
|
||||||
|
[[ "$driver" == "2k3" ]] && bitsPerPel=16
|
||||||
|
|
||||||
find "$target" -maxdepth 1 -type f -iname winnt.sif -delete || return 1
|
find "$target" -maxdepth 1 -type f -iname winnt.sif -delete || return 1
|
||||||
|
|
||||||
@@ -807,7 +811,7 @@ writeSIF() {
|
|||||||
" JoinWorkgroup = \"$sifWorkgroup\"" \
|
" JoinWorkgroup = \"$sifWorkgroup\"" \
|
||||||
'' \
|
'' \
|
||||||
'[Display]' \
|
'[Display]' \
|
||||||
' BitsPerPel=32' \
|
" BitsPerPel=$bitsPerPel" \
|
||||||
" XResolution=$WIDTH" \
|
" XResolution=$WIDTH" \
|
||||||
" YResolution=$HEIGHT" \
|
" YResolution=$HEIGHT" \
|
||||||
'' \
|
'' \
|
||||||
@@ -850,6 +854,10 @@ writeRegistry() {
|
|||||||
local oem="$3"
|
local oem="$3"
|
||||||
local regUsername="$4"
|
local regUsername="$4"
|
||||||
local regPassword="$5"
|
local regPassword="$5"
|
||||||
|
local driver="$6"
|
||||||
|
local bitsPerPelHex="00000020"
|
||||||
|
|
||||||
|
[[ "$driver" == "2k3" ]] && bitsPerPelHex="00000010"
|
||||||
|
|
||||||
{
|
{
|
||||||
printf '%s\n' \
|
printf '%s\n' \
|
||||||
@@ -904,12 +912,12 @@ writeRegistry() {
|
|||||||
printf '%s\n' \
|
printf '%s\n' \
|
||||||
'' \
|
'' \
|
||||||
'[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Video\{23A77BF7-ED96-40EC-AF06-9B1F4867732A}\0000]' \
|
'[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Video\{23A77BF7-ED96-40EC-AF06-9B1F4867732A}\0000]' \
|
||||||
'"DefaultSettings.BitsPerPel"=dword:00000020' \
|
"\"DefaultSettings.BitsPerPel\"=dword:$bitsPerPelHex" \
|
||||||
"\"DefaultSettings.XResolution\"=dword:$XHEX" \
|
"\"DefaultSettings.XResolution\"=dword:$XHEX" \
|
||||||
"\"DefaultSettings.YResolution\"=dword:$YHEX" \
|
"\"DefaultSettings.YResolution\"=dword:$YHEX" \
|
||||||
'' \
|
'' \
|
||||||
'[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\VIDEO\{23A77BF7-ED96-40EC-AF06-9B1F4867732A}\0000]' \
|
'[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Hardware Profiles\Current\System\CurrentControlSet\Control\VIDEO\{23A77BF7-ED96-40EC-AF06-9B1F4867732A}\0000]' \
|
||||||
'"DefaultSettings.BitsPerPel"=dword:00000020' \
|
"\"DefaultSettings.BitsPerPel\"=dword:$bitsPerPelHex" \
|
||||||
"\"DefaultSettings.XResolution\"=dword:$XHEX" \
|
"\"DefaultSettings.XResolution\"=dword:$XHEX" \
|
||||||
"\"DefaultSettings.YResolution\"=dword:$YHEX" \
|
"\"DefaultSettings.YResolution\"=dword:$YHEX" \
|
||||||
'' \
|
'' \
|
||||||
@@ -933,7 +941,7 @@ appendRegistry() {
|
|||||||
'"SCRNSAVE.EXE"="off"' \
|
'"SCRNSAVE.EXE"="off"' \
|
||||||
'"ScreenSaveActive"="0"' \
|
'"ScreenSaveActive"="0"' \
|
||||||
'"DragFullWindows"="1"' \
|
'"DragFullWindows"="1"' \
|
||||||
'"MenuShowDelay"="100"' \
|
'"MenuShowDelay"="0"' \
|
||||||
'' \
|
'' \
|
||||||
'[HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics]' \
|
'[HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics]' \
|
||||||
'"MinAnimate"="0"' \
|
'"MinAnimate"="0"' \
|
||||||
@@ -993,6 +1001,34 @@ appendRegistry() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
writeNT5Effects() {
|
||||||
|
|
||||||
|
local dir="$1"
|
||||||
|
local target="$dir/\$OEM\$/effects.inf"
|
||||||
|
|
||||||
|
{
|
||||||
|
printf '%s\n' \
|
||||||
|
'[Version]' \
|
||||||
|
"Signature=\"\$CHICAGO\$\"" \
|
||||||
|
'' \
|
||||||
|
'[DefaultInstall]' \
|
||||||
|
'BitReg=DisableAnimations' \
|
||||||
|
'' \
|
||||||
|
'[DisableAnimations]' \
|
||||||
|
'; Fade or slide menus into view' \
|
||||||
|
'HKCU,"Control Panel\Desktop","UserPreferencesMask",0,0x02,0' \
|
||||||
|
'' \
|
||||||
|
'; Fade out menu items after clicking' \
|
||||||
|
'HKCU,"Control Panel\Desktop","UserPreferencesMask",0,0x04,1' \
|
||||||
|
'' \
|
||||||
|
'; Fade or slide ToolTips into view' \
|
||||||
|
'HKCU,"Control Panel\Desktop","UserPreferencesMask",0,0x08,1' \
|
||||||
|
''
|
||||||
|
} | unix2dos > "$target" || return 1
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
writeVBS() {
|
writeVBS() {
|
||||||
|
|
||||||
local dir="$1"
|
local dir="$1"
|
||||||
@@ -1092,6 +1128,7 @@ writeVBS() {
|
|||||||
printf '%s\n' \
|
printf '%s\n' \
|
||||||
'[COMMANDS]' \
|
'[COMMANDS]' \
|
||||||
'"REGEDIT /s install.reg"' \
|
'"REGEDIT /s install.reg"' \
|
||||||
|
'"RUNDLL32.EXE setupapi.dll,InstallHinfSection DefaultInstall 128 effects.inf"' \
|
||||||
'"Wscript install.vbs"' \
|
'"Wscript install.vbs"' \
|
||||||
''
|
''
|
||||||
} | unix2dos > "$dir/\$OEM\$/cmdlines.txt" || return 1
|
} | unix2dos > "$dir/\$OEM\$/cmdlines.txt" || return 1
|
||||||
|
|||||||
Reference in New Issue
Block a user