Add files via upload

This commit is contained in:
Useful Stuffs
2024-02-11 12:51:01 +01:00
committed by GitHub
commit eac708fbdc
96 changed files with 28373 additions and 0 deletions

BIN
setup/7z.exe Normal file

Binary file not shown.

4
setup/7zip.nsh Normal file
View File

@@ -0,0 +1,4 @@
Function Install7Zip
File 7z.exe
!insertmacro Install "7-Zip" "7z.exe" "/S"
FunctionEnd

9
setup/ActiveX.inf Normal file
View File

@@ -0,0 +1,9 @@
[Version]
Signature="$CHICAGO$"
AdvancedINF=2.0
[Setup Hooks]
setup=setup
[setup]
run="%EXTRACT_DIR%\setup.exe"

86
setup/AeroWizard.nsh Normal file
View File

@@ -0,0 +1,86 @@
!macro SetFont font parent control
GetDlgItem $0 ${parent} ${control}
SendMessage $0 ${WM_SETFONT} ${font} 0
!macroend
!macro SetControlColor parent control color
GetDlgItem $0 ${parent} ${control}
SetCtlColors $0 ${color} SYSCLR:WINDOW
!macroend
!macro SetBackground parent control
!insertmacro SetControlColor ${parent} ${control} SYSCLR:WINDOWTEXT
!macroend
Var /GLOBAL ChildHwnd
!macro -AeroWizardOnShow
; Get the child window where the wizard page is
FindWindow $ChildHwnd "#32770" "" $HWNDPARENT
; Set font
${If} ${AtLeastWinVista}
; Aero wizard style
${If} ${AtLeastWin11}
; Semi-Fluent style
CreateFont $3 "Segoe UI Variable Display Semibold" 14 600
!insertmacro SetControlColor $HWNDPARENT 1037 SYSCLR:WINDOWTEXT
${Else}
CreateFont $3 "Segoe UI" 12 400
!insertmacro SetControlColor $HWNDPARENT 1037 0x003399
${EndIf}
CreateFont $2 "Segoe UI" 8 400
!insertmacro SetFont $3 $HWNDPARENT 1037
!insertmacro SetFont $2 $HWNDPARENT 1
!insertmacro SetFont $2 $HWNDPARENT 2
!insertmacro SetFont $2 $HWNDPARENT 3
!insertmacro SetFont $2 $HWNDPARENT 1028
!insertmacro SetFont $2 $ChildHwnd 1000
!insertmacro SetFont $2 $ChildHwnd 1004
!insertmacro SetFont $2 $ChildHwnd 1006
!insertmacro SetFont $2 $ChildHwnd 1016
!insertmacro SetFont $2 $ChildHwnd 1022
!insertmacro SetFont $2 $ChildHwnd 1023
!insertmacro SetFont $2 $ChildHwnd 1029
!insertmacro SetFont $2 $ChildHwnd 1027
!insertmacro SetFont $2 $ChildHwnd 1032
!insertmacro SetFont $2 $ChildHwnd 1043
${Else}
; Wizard97 style
${If} ${FileExists} "$FONTS\framd.ttf"
CreateFont $2 "Franklin Gothic Medium" 13 400
!insertmacro SetFont $2 $HWNDPARENT 1037
!insertmacro SetControlColor $HWNDPARENT 1037 0x003399
${Else}
CreateFont $2 "Verdana" 12 800
!insertmacro SetFont $2 $HWNDPARENT 1037
!insertmacro SetControlColor $HWNDPARENT 1037 SYSCLR:WINDOWTEXT
${EndIf}
${EndIf}
; Set white background
SetCtlColors $HWNDPARENT SYSCLR:WINDOWTEXT SYSCLR:WINDOW
SetCtlColors $ChildHwnd SYSCLR:WINDOWTEXT SYSCLR:WINDOW
!insertmacro SetBackground $ChildHwnd 1020
!insertmacro SetBackground $ChildHwnd 1028
!insertmacro SetBackground $ChildHwnd 1006
!insertmacro SetBackground $ChildHwnd 1022
!insertmacro SetBackground $ChildHwnd 1023
!insertmacro SetBackground $ChildHwnd 1027
!insertmacro SetBackground $ChildHwnd 1029
!insertmacro SetBackground $ChildHwnd 1032
!insertmacro SetBackground $ChildHwnd 1043
; Activate taskbar progress bar plugin
${If} ${AtLeastWin7}
LegacyUpdateNSIS::InitTaskbarProgress
${EndIf}
!macroend
Function AeroWizardOnShow
!insertmacro -AeroWizardOnShow
FunctionEnd
Function un.AeroWizardOnShow
!insertmacro -AeroWizardOnShow
FunctionEnd

258
setup/Common.nsh Normal file
View File

@@ -0,0 +1,258 @@
!addplugindir /x86-unicode x86-unicode
SetPluginUnload alwaysoff
!if ${SIGN} == 1
!finalize '../build/sign.sh "%1"'
!uninstfinalize '../build/sign.sh "%1"'
!endif
!define IsNativeIA64 '${IsNativeMachineArchitecture} ${IMAGE_FILE_MACHINE_IA64}'
Function GetArch
Var /GLOBAL Arch
${If} $Arch == ""
${If} ${IsNativeIA32}
StrCpy $Arch "x86"
${ElseIf} ${IsNativeAMD64}
StrCpy $Arch "x64"
${ElseIf} ${IsNativeIA64}
StrCpy $Arch "ia64"
${Else}
StrCpy $Arch ""
${EndIf}
${EndIf}
Push $Arch
FunctionEnd
!macro _HasFlag _a _b _t _f
!insertmacro _LOGICLIB_TEMP
${GetParameters} $_LOGICLIB_TEMP
ClearErrors
${GetOptions} $_LOGICLIB_TEMP `${_b}` $_LOGICLIB_TEMP
IfErrors `${_f}` `${_t}`
!macroend
!define IsActiveXInstall `"" HasFlag "/activex"`
!define IsHelp `"" HasFlag "/?"`
!macro DetailPrint text
SetDetailsPrint both
DetailPrint "${text}"
SetDetailsPrint listonly
!macroend
Var /GLOBAL Download.ID
!macro DownloadRequest url local extra
NSxfer::Request \
/TIMEOUTCONNECT 60000 \
/TIMEOUTRECONNECT 60000 \
/OPTCONNECTTIMEOUT 60000 \
/OPTRECEIVETIMEOUT 60000 \
/OPTSENDTIMEOUT 60000 \
/URL "${url}" \
/LOCAL "${local}" \
/INTERNETFLAGS ${INTERNET_FLAG_RELOAD}|${INTERNET_FLAG_NO_CACHE_WRITE}|${INTERNET_FLAG_KEEP_CONNECTION}|${INTERNET_FLAG_NO_COOKIES}|${INTERNET_FLAG_NO_UI} \
/SECURITYFLAGS ${SECURITY_FLAG_STRENGTH_STRONG} \
${extra} \
/END
Pop $Download.ID
!macroend
Function DownloadWaitSilent
NSxfer::Wait /ID $Download.ID /MODE SILENT /END
NSxfer::Query /ID $Download.ID /ERRORCODE /ERRORTEXT /END
FunctionEnd
Function DownloadWait
NSxfer::Wait /ID $Download.ID /MODE PAGE \
/STATUSTEXT \
"{TIMEREMAINING} left - {RECVSIZE} of {FILESIZE} ({SPEED})" \
"{TIMEREMAINING} left - {TOTALRECVSIZE} of {TOTALFILESIZE} ({SPEED})" \
/ABORT "Legacy Update" "Cancelling will terminate Legacy Update setup." \
/END
NSxfer::Query /ID $Download.ID /ERRORCODE /ERRORTEXT /END
FunctionEnd
!macro -Download name url filename verbose
!insertmacro DetailPrint "Downloading ${name}..."
!insertmacro DownloadRequest "${url}" "${filename}" ""
${If} ${verbose} == 1
Call DownloadWait
${Else}
Call DownloadWaitSilent
${EndIf}
Pop $1
Pop $0
${If} $0 != "OK"
${If} $1 != ${ERROR_INTERNET_OPERATION_CANCELLED}
MessageBox MB_USERICON "${name} failed to download.$\r$\n$\r$\n$0 ($1)" /SD IDOK
${EndIf}
Delete /REBOOTOK "${filename}"
SetErrorLevel 1
Abort
${EndIf}
!macroend
!macro Download name url filename verbose
${If} ${FileExists} "$EXEDIR\${filename}"
${If} $OUTDIR != "$EXEDIR"
SetOutPath "$EXEDIR"
${EndIf}
StrCpy $0 "$EXEDIR\${filename}"
${Else}
${If} $OUTDIR != "$RunOnceDir"
SetOutPath "$RunOnceDir"
${EndIf}
${IfNot} ${FileExists} "$RunOnceDir\${filename}"
!insertmacro -Download '${name}' '${url}' '$RunOnceDir\${filename}' ${verbose}
${EndIf}
StrCpy $0 "$RunOnceDir\${filename}"
${EndIf}
!macroend
Var /GLOBAL Exec.Command
Var /GLOBAL Exec.Name
Var /GLOBAL Exec.IsWusa
Function ExecWithErrorHandling
Push $0
ExecWait '$Exec.Command' $0
${If} $0 == ${ERROR_SUCCESS_REBOOT_REQUIRED}
SetRebootFlag true
${ElseIf} $0 == ${ERROR_INSTALL_USEREXIT}
SetErrorLevel ${ERROR_INSTALL_USEREXIT}
Abort
${ElseIf} $Exec.IsWusa == 1
${AndIf} $0 == 1
; wusa exits with 1 if the patch is already installed. Treat this as success.
DetailPrint "Installation skipped - already installed"
${ElseIf} $Exec.IsWusa == 1
${AndIf} $0 == ${WU_S_ALREADY_INSTALLED}
DetailPrint "Installation skipped - already installed"
${ElseIf} $Exec.IsWusa == 1
${AndIf} $0 == ${WU_E_NOT_APPLICABLE}
DetailPrint "Installation skipped - not applicable"
${ElseIf} $0 != 0
LegacyUpdateNSIS::MessageForHresult $0
Pop $1
MessageBox MB_USERICON "$Exec.Name failed to install.$\r$\n$\r$\n$1 ($0)" /SD IDOK
SetErrorLevel $0
Abort
${EndIf}
Pop $0
FunctionEnd
!macro ExecWithErrorHandling name command iswusa
StrCpy $Exec.Command '${command}'
StrCpy $Exec.Name '${name}'
StrCpy $Exec.IsWusa '${iswusa}'
Call ExecWithErrorHandling
!macroend
!macro Install name filename args
!insertmacro DetailPrint "Installing ${name}..."
!insertmacro ExecWithErrorHandling '${name}' '"$0" ${args}' 0
!macroend
!macro InstallSP name filename
; SPInstall.exe /norestart seems to be broken. We let it do a delayed restart, then cancel it.
!insertmacro DetailPrint "Extracting ${name}..."
!insertmacro ExecWithErrorHandling '${name}' '"$0" /X:"$PLUGINSDIR\${filename}"' 0
!insertmacro DetailPrint "Installing ${name}..."
!insertmacro ExecWithErrorHandling '${name}' '"$PLUGINSDIR\${filename}\spinstall.exe" /unattend /nodialog /warnrestart:600' 0
; If we successfully abort a shutdown, we'll get exit code 0, so we know a reboot is required.
ExecWait "$WINDIR\system32\shutdown.exe /a" $0
${If} $0 == 0
SetRebootFlag true
${EndIf}
!macroend
!macro DownloadMSU kbid name url
!insertmacro Download '${name} (${kbid})' '${url}' '${kbid}.msu' 1
!macroend
!macro InstallMSU kbid name
; Stop AU service before running wusa so it doesn't try checking for updates online first (which
; may never complete before we install our patches).
!insertmacro DetailPrint "Installing ${name} (${kbid})..."
SetDetailsPrint none
ExecShellWait "" "$WINDIR\system32\net.exe" "stop wuauserv" SW_HIDE
SetDetailsPrint listonly
!insertmacro ExecWithErrorHandling '${name} (${kbid})' '$WINDIR\system32\wusa.exe /quiet /norestart "$0"' 1
!macroend
!macro EnsureAdminRights
${IfNot} ${AtLeastWin2000}
MessageBox MB_USERICON "Legacy Update requires at least Windows 2000." /SD IDOK
SetErrorLevel ${ERROR_OLD_WIN_VERSION}
Quit
${EndIf}
System::Call '${IsUserAnAdmin}() .r0'
${If} $0 == 0
MessageBox MB_USERICON "Log on as an administrator to install Legacy Update." /SD IDOK
SetErrorLevel ${ERROR_ELEVATION_REQUIRED}
Quit
${EndIf}
!macroend
!macro InhibitSleep state
${If} ${state} == 1
System::Call '${SetThreadExecutionState}(${ES_CONTINUOUS}|${ES_SYSTEM_REQUIRED})'
${Else}
System::Call '${SetThreadExecutionState}(${ES_CONTINUOUS})'
${EndIf}
!macroend
!macro TryWithRetry command error
ClearErrors
${command}
IfErrors 0 +3
MessageBox MB_RETRYCANCEL|MB_USERICON \
'${error}$\r$\n$\r$\nIf Internet Explorer is open, close it and click Retry.' \
/SD IDCANCEL \
IDRETRY -3
Abort
!macroend
!macro TryFile file oname
!insertmacro TryWithRetry `File "/ONAME=${oname}" "${file}"` 'Unable to write to "${oname}".'
!macroend
!macro TryDelete file
!insertmacro TryWithRetry `Delete "${file}"` 'Unable to delete "${file}".'
!macroend
!macro TryRename src dest
!insertmacro TryWithRetry `Rename "${src}" "${dest}"` 'Unable to write to "${dest}".'
!macroend
!macro RegisterDLL un arch file
${If} "${un}" == "Un"
StrCpy $0 "/u"
${Else}
StrCpy $0 ""
${EndIf}
${If} "${arch}" == "x64"
${DisableX64FSRedirection}
${EndIf}
ClearErrors
ExecWait '"$WINDIR\system32\regsvr32.exe" /s $0 "${file}"'
${If} ${Errors}
; Do it again non-silently so the user can see the error.
ExecWait '"$WINDIR\system32\regsvr32.exe" $0 "${file}"'
${If} "${arch}" == "x64"
${EnableX64FSRedirection}
${EndIf}
Abort
${EndIf}
${If} "${arch}" == "x64"
${EnableX64FSRedirection}
${EndIf}
!macroend

51
setup/Constants.nsh Normal file
View File

@@ -0,0 +1,51 @@
; Product
!define NAME "WUIsBack"
!define DOMAIN "legacyupdate.net"
; Version
!getdllversion "..\Release\LegacyUpdate.dll" DLLVersion_
!define LONGVERSION "${DLLVersion_1}.${DLLVersion_2}.${DLLVersion_3}.${DLLVersion_4}"
!define VERSION "${DLLVersion_1}.${DLLVersion_2}.${DLLVersion_3}"
!if ${DLLVersion_3} == 0
!define /redef VERSION "${DLLVersion_1}.${DLLVersion_2}"
!endif
; Main URLs
!define WEBSITE "http://legacyupdate.net/"
!define UPDATE_URL "http://legacyupdate.net/windowsupdate/v6/"
!define UPDATE_URL_HTTPS "https://legacyupdate.net/windowsupdate/v6/"
!define WSUS_SERVER "http://fritzbox3272.controlliamo.com/WUIsBack/v6"
!define WSUS_SERVER_HTTPS "https://fritzbox3272.controlliamo.com/WUIsBack/v6"
!define TRUSTEDR "http://download.windowsupdate.com/msdownload/update/v3/static/trustedr/en"
!define WIN81UPGRADE_URL "https://go.microsoft.com/fwlink/?LinkId=798437"
; Control Panel entry
!define CPL_GUID "{FFBE8D44-E9CF-4DD8-9FD6-976802C94D9C}"
!define CPL_APPNAME "LegacyUpdate"
; RunOnce
!define RUNONCE_USERNAME "LegacyUpdateTemp"
!define RUNONCE_PASSWORD "Legacy_Update0"
; Registry keys
!define REGPATH_LEGACYUPDATE_SETUP "Software\Hashbang Productions\Legacy Update\Setup"
!define REGPATH_UNINSTSUBKEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${NAME}"
!define REGPATH_WUPOLICY "Software\Policies\Microsoft\Windows\WindowsUpdate"
!define REGPATH_WUAUPOLICY "${REGPATH_WUPOLICY}\AU"
!define REGPATH_WU "Software\Microsoft\Windows\CurrentVersion\WindowsUpdate"
!define REGPATH_WU_SERVICES "${REGPATH_WU}\Services"
!define REGPATH_INETSETTINGS "Software\Microsoft\Windows\CurrentVersion\Internet Settings"
!define REGPATH_ZONEDOMAINS "${REGPATH_INETSETTINGS}\ZoneMap\Domains"
!define REGPATH_ZONEESCDOMAINS "${REGPATH_INETSETTINGS}\ZoneMap\EscDomains"
!define REGPATH_CPLNAMESPACE "Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace\${CPL_GUID}"
!define REGPATH_CPLCLSID "CLSID\${CPL_GUID}"
!define REGPATH_WINLOGON "Software\Microsoft\Windows NT\CurrentVersion\Winlogon"
!define REGPATH_POSREADY "System\WPA\PosReady"
!define REGPATH_SCHANNEL_PROTOCOLS "System\CurrentControlSet\Control\SecurityProviders\SChannel\Protocols"
!define REGPATH_DOTNET_V2 "Software\Microsoft\.NETFramework\v2.0.50727"
!define REGPATH_DOTNET_V4 "Software\Microsoft\.NETFramework\v4.0.30319"
!define REGPATH_RUNONCE "Software\Microsoft\Windows\CurrentVersion\RunOnce"
!define REGPATH_PACKAGEINDEX "Software\Microsoft\Windows\CurrentVersion\Component Based Servicing\PackageIndex"
!define REGPATH_SERVICING_SHA2 "Software\Microsoft\Windows\CurrentVersion\Servicing\Codesigning\SHA2"
!define REGPATH_COMPONENT_THEMES "Software\Microsoft\Active Setup\Installed Components\{2C7339CF-2B09-4501-B3F3-F3508C9228ED}"

122
setup/Download2KXP.nsh Normal file
View File

@@ -0,0 +1,122 @@
Function GetUpdateLanguage
Var /GLOBAL UpdateLanguage
${If} $UpdateLanguage == ""
ReadRegStr $UpdateLanguage HKLM "Hardware\Description\System" "Identifier"
${If} $UpdateLanguage == "NEC PC-98"
StrCpy $UpdateLanguage "NEC98"
${Else}
ReadRegStr $UpdateLanguage HKLM "System\CurrentControlSet\Control\Nls\Language" "InstallLanguage"
ReadINIStr $UpdateLanguage $PLUGINSDIR\Patches.ini Language $UpdateLanguage
${EndIf}
${EndIf}
Push $UpdateLanguage
FunctionEnd
!macro NeedsSPHandler name os sp
Function Needs${name}
${If} ${Is${os}}
${AndIf} ${AtMostServicePack} ${sp}
Push 1
${Else}
Push 0
${EndIf}
FunctionEnd
!macroend
!macro NeedsFileVersionHandler name file version
Function Needs${name}
${GetFileVersion} "$SYSDIR\${file}" $0
${VersionCompare} $0 ${version} $1
${If} $1 == 2 ; Less than
Push 1
${Else}
Push 0
${EndIf}
FunctionEnd
!macroend
Var /GLOBAL Patch.Key
Var /GLOBAL Patch.File
Var /GLOBAL Patch.Title
Function -PatchHandler
Call GetUpdateLanguage
Call GetArch
Pop $1
Pop $0
ClearErrors
ReadINIStr $0 $PLUGINSDIR\Patches.ini "$Patch.Key" $0-$1
${If} ${Errors}
; Language neutral
ClearErrors
ReadINIStr $0 $PLUGINSDIR\Patches.ini "$Patch.Key" $1
${If} ${Errors}
MessageBox MB_USERICON "$Patch.Title could not be installed.$\r$\n$\r$\nThe installed Windows language and/or architecture is not supported." /SD IDOK
SetErrorLevel 1
Abort
${EndIf}
${EndIf}
!insertmacro Download "$Patch.Title" "$0" "$Patch.File" 1
FunctionEnd
!macro PatchHandler kbid title params
Function Download${kbid}
Call Needs${kbid}
Pop $0
${If} $0 == 1
StrCpy $Patch.Key "${kbid}"
StrCpy $Patch.File "${kbid}.exe"
StrCpy $Patch.Title "${title}"
Call -PatchHandler
${EndIf}
FunctionEnd
Function Install${kbid}
Call Needs${kbid}
Pop $0
${If} $0 == 1
Call Download${kbid}
!insertmacro Install "${title}" "${kbid}.exe" "${params}"
${EndIf}
FunctionEnd
!macroend
!insertmacro NeedsSPHandler "W2KSP4" "Win2000" 2
!insertmacro NeedsSPHandler "XPSP2" "WinXP2002" 0
!insertmacro NeedsSPHandler "XPSP3" "WinXP2002" 2
!insertmacro NeedsSPHandler "XPESP3" "WinXP2002" 2
!insertmacro NeedsSPHandler "2003SP2" "WinXP2003" 1
!insertmacro NeedsFileVersionHandler "KB835732" "kernel32.dll" "5.00.2195.6897"
!insertmacro NeedsFileVersionHandler "IE6" "mshtml.dll" "6.0.2600.0"
!insertmacro PatchHandler "W2KSP4" "Windows 2000 Service Pack 4" "-u -z"
!insertmacro PatchHandler "KB835732" "Windows 2000 KB835732 Update" "/passive /norestart"
!insertmacro PatchHandler "XPSP2" "Windows XP Service Pack 2" "/passive /norestart"
!insertmacro PatchHandler "XPSP3" "Windows XP Service Pack 3" "/passive /norestart"
!insertmacro PatchHandler "2003SP2" "Windows XP x64 Edition/Server 2003 Service Pack 2" "/passive /norestart"
!insertmacro PatchHandler "XPESP3" "Windows XP Embedded Service Pack 3" "/passive /norestart"
Function DownloadIE6
Call NeedsIE6
Pop $0
${If} $0 == 1
StrCpy $Patch.Key "W2KIE6"
StrCpy $Patch.File "ie6sp1.cab"
StrCpy $Patch.Title "Internet Explorer 6 SP1"
Call -PatchHandler
${EndIf}
FunctionEnd
Function InstallIE6
Call NeedsIE6
Pop $0
${If} $0 == 1
Call DownloadIE6
!insertmacro DetailPrint "Extracting Internet Explorer 6 SP1..."
ExecShellWait "" "$WINDIR\system32\expand.exe" '"$OUTDIR\ie6sp1.cab" -F:ie6setup.exe "$PLUGINSDIR"' SW_HIDE
ExecShellWait "" "$WINDIR\system32\expand.exe" '"$OUTDIR\ie6sp1.cab" -F:iebatch.txt "$PLUGINSDIR"' SW_HIDE
!insertmacro DetailPrint "Installing Internet Explorer 6 SP1..."
!insertmacro ExecWithErrorHandling 'Internet Explorer 6 SP1' '"$PLUGINSDIR\ie6setup.exe" /q' 0
${EndIf}
FunctionEnd

46
setup/Download8.nsh Normal file
View File

@@ -0,0 +1,46 @@
; Windows 8 Servicing Stack
!insertmacro MSUHandler "KB4598297" "2021-01 Servicing Stack Update for Windows Server 2012" "Package_for_KB4598297"
; Windows 8.1 Servicing Stack
!insertmacro MSUHandler "KB3021910" "2015-04 Servicing Stack Update for Windows 8.1" "Package_for_KB3021910"
; Windows 8.1 Update 1
!insertmacro MSUHandler "KB2919355" "Windows 8.1 Update 1" "Package_for_KB2919355"
!insertmacro MSUHandler "KB2932046" "Windows 8.1 Update 1" "Package_for_KB2932046"
!insertmacro MSUHandler "KB2959977" "Windows 8.1 Update 1" "Package_for_KB2959977"
!insertmacro MSUHandler "KB2937592" "Windows 8.1 Update 1" "Package_for_KB2937592"
!insertmacro MSUHandler "KB2934018" "Windows 8.1 Update 1" "Package_for_KB2934018"
Function NeedsWin81Update1
Call NeedsKB2919355
Call NeedsKB2932046
Call NeedsKB2937592
Call NeedsKB2934018
Pop $0
Pop $1
Pop $2
Pop $3
Pop $4
${If} $0 == 1
${OrIf} $1 == 1
${OrIf} $2 == 1
${OrIf} $3 == 1
Push 1
${Else}
Push 0
${EndIf}
FunctionEnd
; Weird prerequisite to Update 1 that fixes the main KB2919355 update failing to install
Function DownloadClearCompressionFlag
Call GetArch
Pop $0
ReadINIStr $0 $PLUGINSDIR\Patches.ini ClearCompressionFlag $0
!insertmacro Download "Windows 8.1 Update 1 Preparation Tool" "$0" "ClearCompressionFlag.exe" 1
FunctionEnd
Function InstallClearCompressionFlag
Call DownloadClearCompressionFlag
!insertmacro Install "Windows 8.1 Update 1 Preparation Tool" "ClearCompressionFlag.exe" ""
FunctionEnd

145
setup/DownloadVista7.nsh Normal file
View File

@@ -0,0 +1,145 @@
Function GetComponentArch
Var /GLOBAL ComponentArch
${If} $ComponentArch == ""
${If} ${IsNativeIA32}
StrCpy $ComponentArch "x86"
${ElseIf} ${IsNativeAMD64}
StrCpy $ComponentArch "amd64"
${ElseIf} ${IsNativeIA64}
StrCpy $ComponentArch "ia64"
${Else}
StrCpy $ComponentArch ""
${EndIf}
${EndIf}
Push $ComponentArch
FunctionEnd
!macro SPHandler kbid title os sp
!insertmacro NeedsSPHandler "${kbid}" "${os}" "${sp}"
Function Download${kbid}
Call Needs${kbid}
Pop $0
${If} $0 == 1
Call GetArch
Pop $0
ReadINIStr $0 $PLUGINSDIR\Patches.ini "${kbid}" $0
!insertmacro Download "${title}" "$0" "${kbid}.exe" 1
${EndIf}
FunctionEnd
Function Install${kbid}
Call Needs${kbid}
Pop $0
${If} $0 == 1
Call Download${kbid}
!insertmacro InstallSP "${title}" "${kbid}.exe"
${EndIf}
FunctionEnd
!macroend
!macro MSUHandler kbid title packagename
Function Needs${kbid}
Call GetComponentArch
Pop $0
ClearErrors
EnumRegKey $1 HKLM "${REGPATH_PACKAGEINDEX}\${packagename}~31bf3856ad364e35~$0~~0.0.0.0" 0
${If} ${Errors}
Push 1
${Else}
Push 0
${EndIf}
FunctionEnd
Function Download${kbid}
Call Needs${kbid}
Pop $0
${If} $0 == 1
Call GetArch
Pop $0
ReadINIStr $1 $PLUGINSDIR\Patches.ini "${kbid}" $0
!insertmacro DownloadMSU "${kbid}" "${title}" "$1"
${EndIf}
FunctionEnd
Function Install${kbid}
Call Needs${kbid}
Pop $0
${If} $0 == 1
Call Download${kbid}
!insertmacro InstallMSU "${kbid}" "${title}"
${EndIf}
FunctionEnd
!macroend
; Service Packs
!insertmacro SPHandler "VistaSP1" "Windows Vista Service Pack 1" "WinVista" 0
!insertmacro SPHandler "VistaSP2" "Windows Vista Service Pack 2" "WinVista" 1
!insertmacro SPHandler "Win7SP1" "Windows 7 Service Pack 1" "Win7" 0
; Windows Vista post-SP2 update combination that fixes WU indefinitely checking for updates
!insertmacro MSUHandler "KB3205638" "Security Update for Windows Vista" "Package_for_KB3205638"
!insertmacro MSUHandler "KB4012583" "Security Update for Windows Vista" "Package_for_KB4012583"
!insertmacro MSUHandler "KB4015195" "Security Update for Windows Vista" "Package_for_KB4015195"
!insertmacro MSUHandler "KB4015380" "Security Update for Windows Vista" "Package_for_KB4015380"
; Vista IE9
!insertmacro MSUHandler "KB971512" "Update for Windows Vista" "Package_for_KB971512"
!insertmacro MSUHandler "KB2117917" "Platform Update Supplement for Windows Vista" "Package_for_KB2117917"
!insertmacro NeedsFileVersionHandler "IE9" "mshtml.dll" "9.0.8112.16421"
!insertmacro PatchHandler "IE9" "Internet Explorer 9 for Windows Vista" "/passive /norestart /update-no /closeprograms"
; Windows Vista Servicing Stack Update
!insertmacro MSUHandler "KB4493730" "2019-04 Servicing Stack Update for Windows Server 2008" "Package_1_for_KB4493730"
; Windows 7 Servicing Stack Update
!insertmacro MSUHandler "KB3138612" "2016-03 Servicing Stack Update for Windows 7" "Package_for_KB3138612"
!insertmacro MSUHandler "KB4474419" "SHA-2 Code Signing Support Update for Windows 7" "Package_for_KB4474419"
!insertmacro MSUHandler "KB4490628" "2019-03 Servicing Stack Update for Windows 7" "Package_for_KB3138612"
; Windows Home Server 2011 Update Rollup 4
!insertmacro MSUHandler "KB2757011" "Windows Home Server 2011 Update Rollup 4" "Package_for_KB2757011"
Function NeedsVistaPostSP2
Call NeedsKB3205638
Call NeedsKB4012583
Call NeedsKB4015195
Call NeedsKB4015380
Call NeedsKB4493730
Pop $0
Pop $1
Pop $2
Pop $3
Pop $4
${If} $0 == 1
${OrIf} $1 == 1
${OrIf} $2 == 1
${OrIf} $3 == 1
${OrIf} $4 == 1
Push 1
${Else}
Push 0
${EndIf}
FunctionEnd
Function NeedsWin7SHA2
ReadRegDWORD $0 HKLM "${REGPATH_SERVICING_SHA2}" "SHA2-Codesigning-Support"
${If} $0 == 1
Push 0
${Else}
Call NeedsKB3138612
Call NeedsKB4474419
Call NeedsKB4490628
Pop $0
Pop $1
Pop $2
${If} $0 == 1
${OrIf} $1 == 1
${OrIf} $2 == 1
Push 1
${Else}
Push 0
${EndIf}
${EndIf}
FunctionEnd

47
setup/DownloadWUA.nsh Normal file
View File

@@ -0,0 +1,47 @@
Function DetermineWUAVersion
; Hardcoded special case for XP Home/Embedded SP3, because the WUA 7.6.7600.256 setup SFX is
; seriously broken on it, potentially causing an unbootable Windows install due to it entering an
; infinite loop of creating folders in the root of C:.
${If} ${IsWinXP2002}
${AndIf} ${AtLeastServicePack} 3
${AndIf} ${IsHomeEdition}
${OrIf} ${IsEmbedded}
StrCpy $1 "5.1.3-home"
${Else}
GetWinVer $1 Major
GetWinVer $2 Minor
GetWinVer $3 ServicePack
StrCpy $1 "$1.$2.$3"
${EndIf}
StrCpy $0 ""
ClearErrors
ReadINIStr $2 $PLUGINSDIR\Patches.ini WUA $1
${If} ${Errors}
Return
${EndIf}
${GetFileVersion} "$SYSDIR\wuapi.dll" $1
${VersionCompare} $1 $2 $3
${If} $3 == 2
Call GetArch
Pop $0
ReadINIStr $0 $PLUGINSDIR\Patches.ini WUA $2-$0
${EndIf}
FunctionEnd
Function DownloadWUA
Call DetermineWUAVersion
${If} $0 != ""
!insertmacro Download "Windows Update Agent" "$0" "WindowsUpdateAgent.exe" 1
${EndIf}
FunctionEnd
Function InstallWUA
Call DetermineWUAVersion
${If} $0 != ""
Call DownloadWUA
!insertmacro Install "Windows Update Agent" "WindowsUpdateAgent.exe" "/quiet /norestart"
${EndIf}
FunctionEnd

346
setup/Patches.ini Normal file
View File

@@ -0,0 +1,346 @@
[Language]
0401=ARA
0403=CAT
0404=CHT
0804=CHS
0405=CSY
0406=DAN
0407=DEU
0408=ELL
0409=ENU
0c0a=ESN
0425=ETI
040b=FIN
040c=FRA
040d=HEB
040e=HUN
0410=ITA
0411=JPN
0412=KOR
0427=LTH
0426=LVI
0413=NLD
0414=NOR
0415=PLK
0416=PTB
0816=PTG
0418=ROM
0419=RUS
041a=HRV
041b=SKY
041d=SVE
041e=THA
041f=TRK
0424=SLV
042a=VIT
042d=EUQ
0c04=CHH
; Windows 2000
[W2KSP4]
ARA-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_ar_d2a46163d29f14829f230729e2c0821.exe
CHH-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_hk_89b5425007c388c1c146756557915ab.exe
CHS-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_cn_a6d8fab4fe598cf1d5c3cf257b11fc8.exe
CHT-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_tw_baf16f1aaae8be095127f4a46dded69.exe
CSY-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_cs_d055279f80e684debdac3f4a230ab2c.exe
DAN-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_da_e9afc8657e31b34730ea2cda85ece36.exe
DEU-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_de_00d4912b4703c77c46cf53a8a8f2027.exe
ELL-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_el_55eeec8b3b303e61cb0ddab4d943cd1.exe
ENU-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_en_7f12d2da3d7c5b6a62ec4fde9a4b1e6.exe
ESN-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_es_51bae94c83adcf9f0ad3155bcf3ddfc.exe
FIN-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_fi_794e2bba5a5286287dccf7943055e46.exe
FRA-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_fr_4556797dfc88fdd4be13d638bcfb655.exe
HEB-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_he_b8e8519d7ae067f49ce742b59e8bcce.exe
HUN-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_hu_1de3d254582472c714af315c85bf2b3.exe
ITA-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_it_6395c3848397fa6cf05e0c3d1923205.exe
JPN-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_ja_beb10c6f96ac4bb93f6e192b419a50f.exe
KOR-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_ko_8bd7a0eedfaf1fb30439abdad43c347.exe
NLD-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_nl_07596ad911493b966a18b6626e4a1c4.exe
NOR-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_no_64602c5f513d7244dd5790c6a11577e.exe
PLK-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_pl_5248f4f8262d599079f5ee246cafc28.exe
PTB-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_br_a90a49821bf9b5e37810e4c453a5128.exe
PTG-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_pt_cdf5d5ecd163862ff6f641b0a4d4168.exe
RUS-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_ru_980742b1376cf5614a9e10705952dcd.exe
SVE-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_sv_c46814adb550c5184297a290acd9d25.exe
TRK-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_tr_3d5c002a300e271049b18acdc569d83.exe
NEC98-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/w2ksp4_ja_7cf59dd6babe7afcf1d7489b40941a8.exe
[KB835732]
ARA-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-ara_caf56d0f9606b68387a228f7aae57d5.exe
CHH-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-cht_c3991c4bde0e9996c3d0727cd3fdbc1.exe
CHS-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-chs_779d1b67c993ed5edaeeb6706f37a0d.exe
CHT-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-cht_c3991c4bde0e9996c3d0727cd3fdbc1.exe
CSY-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-csy_c4f86e2d69be35ba780c4f930b43e63.exe
DAN-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-dan_3a6d22e0daccb7fe2d77ccda8624283.exe
DEU-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-deu_62210b6322e8370917f00fb0eb40bf1.exe
ELL-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-ell_5f2073b1f1cad898c61bea003084320.exe
ENU-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-enu_7b7d1dffd9347af2c166bfcecc4782c.exe
ESN-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-esn_d62fd2652c870e4a06766638a4b119b.exe
FIN-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-fin_08a377df67f697ce14d53d1d9f8dab1.exe
FRA-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-fra_85fb76a002b43ad7f8bf236a4469ad4.exe
HEB-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-heb_4c1f72024873e31a37fad21b9194dfc.exe
HUN-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-hun_538b15f6b13aba4549248313cfa4c7c.exe
ITA-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-ita_10e1ca8aec2249cca79a2dd6f7d05ff.exe
JPN-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-jpn_2602d9d56b3995923611494ea90f535.exe
KOR-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-kor_852d1690cd8c36ecf681a454fac484a.exe
NLD-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-nld_742d6aadbbe08ca67b755e0abaaeb8c.exe
NOR-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-nor_99fac6bc7b291e7bc6d7655ea8da446.exe
PLK-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-plk_27a55ddbb55db37b9e15e9975b3f106.exe
PTB-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-ptb_f7d297c52fd7ef6006d3b2798a10025.exe
PTG-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-ptg_67c7095f1db29bb1b4ecb3d253fdde7.exe
RUS-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-rus_0d1eca332ca7543d4cf80846eee3a80.exe
SVE-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-sve_087a446929bed6a79649a7c5a418220.exe
TRK-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-x86-trk_8dc398f69b7c8c59466511aa21eb67c.exe
NEC98-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windows2000-kb835732-nec98-jpn_8fb43a1fa0f40115cae8f3ea72d52bc.exe
[W2KIE6]
ARA-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-ara_b1720a72becd05142cb4ccbb23205c76b51d29e2.cab
CHH-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-cht_1899bffb8ebf36c0a58686f04cc1d721c419792d.cab
CHS-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-chs_6d93ab8525d3b6f775faf692caaa4c8267c8a22b.cab
CHT-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-cht_1899bffb8ebf36c0a58686f04cc1d721c419792d.cab
CSY-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-csy_2789a030bba2128fc90e0475e2530c300ed5defc.cab
DAN-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-dan_0c178b2634a97a4879c172797b21a59e567d18e6.cab
DEU-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-deu_2a13ac14e403ad4a1c6877fe478067e81ac20da8.cab
ELL-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-ell_15a4e43c8922f658eddd5d57d23c11e0fa55dce9.cab
ENU-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-enu_91192253c8d3cf7beff22e68ae1fdff9638bf546.cab
ESN-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-esn_a9c53ad93bae78becf2b06f6d317ef7ef66a2abe.cab
FIN-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-fin_1a369fcc86e803128144e17246e16d0a27a8c35b.cab
FRA-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-fra_0bc4219b3119a127503cd93863cfedfb1e37bd55.cab
HEB-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-heb_70518dd1d09d702975b8e44a22c88e139f168975.cab
HUN-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-hun_1eeed3e7b3e6bd311c17c0d97f67ec12df8b4b85.cab
ITA-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-ita_2c6ab20b41114e53646ebb56ff6d269fd86fba36.cab
JPN-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-jpn_b1e1e8b9dbbf440d8964ec375348674502ef0728.cab
KOR-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-kor_f61474b056ae37c5e9670978c6d3b24f4800d7f5.cab
NLD-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-nld_3fd676fe34f93471f4db9a0a1f3ef5c3ed8e5f43.cab
NOR-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-nor_72a81d06462c5a66f9531f4f226b13463698dd24.cab
PLK-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-plk_14889750985a9d29490886c2e901ef3bc69c4ff5.cab
PTB-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-ptb_448df44aea5d853e4954d48411b1953569df23c2.cab
PTG-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-ptg_5892593c72f702ba6c7d88b47c2bd7c5707081fd.cab
RUS-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-rus_842c289d0887bbe2e4edea1ff3763addc8d77db5.cab
SVE-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-sve_db8dcfef073f2df327fc3706d9a141b6124cfed0.cab
TRK-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-trk_64479241feb2f783f851b16791d5d1c684d94a66.cab
NEC98-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/ie6sp1-wucab-jpn_b1e1e8b9dbbf440d8964ec375348674502ef0728.cab
; Windows XP 2002
[XPSP2]
ARA-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_a001b2b27b0f748ab89bd28fa45359f28f95ffb6.exe
CHH-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_546c11a0a5a41e90ae5f021f234d9abad5a0a25a.exe
CHS-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_554ee954bae0f65e88b706cf9b9fd733c02fa397.exe
CHT-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_66d8ba2cbf90737010a45e2b5969c9a779ab1d35.exe
CSY-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_767f81c9d0154bfa21d19a49e0b27ede9f93190a.exe
DAN-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_e60a2b567fda2ab2cf4629700cf65cd3f4d46b0d.exe
DEU-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_ac8d3101744ff56f74a4de941dc04a7e567c8ba7.exe
ELL-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_fd86a331f91bc16185e88e6706db859cb27264d1.exe
ENU-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_33a8fef60d48ae1f2c4feea27111af5ceca3c4f6.exe
ESN-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_8e7e8de62676d994a7412df190fcdce848f25cf0.exe
FIN-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_2feacc1ad5a703d508e9aee4c2fca1e0b9ca9962.exe
FRA-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_da94a031147ebd6f8d02eadb7972801843a533bb.exe
HEB-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_76096ed9f2218ac7a14472cbf435f380ffc1c2f6.exe
HUN-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_bd03a3d2a28de2de9e58da3e5dec888ffae25aca.exe
ITA-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_1334fdd285666bfd821eef8590914f188b1bcc0c.exe
JPN-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_d36c0a7046f2dbe29dfff33b6dbb6bb4574bbd7d.exe
KOR-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_4a6b32f007fe94a2a8b4542fc6778582ef4245e3.exe
NLD-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_64551a535981fbcd9c2bac3f91df30c6b3610725.exe
NOR-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_ace2994463597f9cb7cb059e1dca2a87c12bf278.exe
PLK-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_8aefc12abade033f2f093786646206fbb70cbb5d.exe
PTB-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_bcbc1bbb2c493dd0a942d13695b18da0400188f8.exe
PTG-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_db1f7c486f0eda249d77ae91c858a162cefb769b.exe
RUS-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_72946fbe955201f2387430963d4372cda7cac392.exe
SVE-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_3ff578d759e77df91effefe34a42030b8ada1c24.exe
TRK-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/xpsp2_68cfeb8fda746b900f9c3ce313d7348c812fd30d.exe
[XPSP3]
ARA-x86=http://download.windowsupdate.com/msdownload/update/software/dflt/2008/04/windowsxp-kb936929-sp3-x86-ara_4e82a87cea3b9643fd57b39393a88061614cdae6.exe
CHH-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-chh_2663fb610f29e65a10be176740ea6757ca1f22d5.exe
CHS-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-chs_d7067e86abd4257454200d0c398d71c4ce6cd33e.exe
CHT-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-cht_8a0625e10b8c6cb88d9d1952f1a189fbd761b744.exe
CSY-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-csy_7af606916b887dba9dd38ae282505ce2c2b81b08.exe
DAN-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-dan_37e03a7d43ad65bc4b71f3947c76bd2fc0fe44d6.exe
DEU-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-deu_f2dcd2211384a78df215c696a7fd1a7949dc794b.exe
ELL-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-ell_cec2ed1c3097e44e62dcb1f2a473a64a58e031fe.exe
ENU-x86=http://download.windowsupdate.com/msdownload/update/software/dflt/2008/04/windowsxp-kb936929-sp3-x86-enu_c81472f7eeea2eca421e116cd4c03e2300ebfde4.exe
ESN-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-esn_e305becfc6fd5a8199368ceffc496397247ac60f.exe
FIN-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-fin_5654c021a03bfb10543a2c673bdfc42a853e347a.exe
FRA-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-fra_414b61bbc86e09579d8447baa23eb1b867f9ca93.exe
HEB-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-heb_eb8fc9ff0890279346661dde065c14b5c696e423.exe
HUN-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-hun_77b70fe421baeebb115c2f378b8a1fc274db9867.exe
ITA-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-ita_2162c1d419d1e462a7dc34294528b2daf593302c.exe
JPN-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-jpn_e0fc34cfa52d270b3c79a68af8fa358244f7419e.exe
KOR-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-kor_8ca7e862bfc2742ad9c4c58df0b0cd5ad4b700ae.exe
NLD-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-nld_b2576b4d1972583a3b776fdf963b914341d34058.exe
NOR-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-nor_67c9167275a2c3e3884a38c2ad7387556ad4713a.exe
PLK-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-plk_7cbe718131e9c71b322f1149e86bedba351ba11c.exe
PTB-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-ptb_02900ef11f5a982a93de5f927997ce92d5a81a86.exe
PTG-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-ptg_bc5189c05e93cd0e5742712d84f0b5f5ffcbb7e4.exe
RUS-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-rus_850cda9f57033a17d046a56d422547ea80dcaf61.exe
SVE-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-sve_13c5ecca22e12224934a1faa1190ee34db3995ae.exe
TRK-x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windowsxp-kb936929-sp3-x86-trk_5aaf60501636af08c97ef1c18f1315f4ed6fbcdf.exe
[XPESP3]
; Only seems to be available in English.
x86=http://web.archive.org/web/20140813085714/http://download.microsoft.com/download/3/a/e/3aea3d4e-159d-4078-a5b4-5b1e4f5a4db4/WindowsXP-KB958255-ENU.exe
; Windows XP 2003
[2003SP2]
CHH-x86=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windowsserver2003-kb914961-sp2-x86-chh_2de4fb187533e226cd615bcda30b9a8a2836e197.exe
CHS-x86=http://download.windowsupdate.com/msdownload/update/software/dflt/2008/02/windowsserver2003-kb914961-sp2-x86-chs_c3e7772c6ad063bac3cb6ca05ea6e1b39c5bb35d.exe
CHT-x86=http://download.windowsupdate.com/msdownload/update/software/dflt/2008/02/windowsserver2003-kb914961-sp2-x86-cht_65a62b8ef051bf93d0ccd78900fe8d6709d37a92.exe
CSY-x86=http://download.windowsupdate.com/msdownload/update/software/dflt/2008/02/windowsserver2003-kb914961-sp2-x86-csy_fa0c18ba0a265001778e9d2691086742fc4efeb6.exe
DEU-x86=http://download.windowsupdate.com/msdownload/update/software/dflt/2008/02/windowsserver2003-kb914961-sp2-x86-deu_f9a055504e882bb06ce2c7e83319000d905f7917.exe
ENU-x86=http://download.windowsupdate.com/msdownload/update/software/dflt/2008/02/windowsserver2003-kb914961-sp2-x86-enu_51e1759a1fda6cd588660324abaed59dd3bbe86b.exe
ESN-x86=http://download.windowsupdate.com/msdownload/update/software/dflt/2008/02/windowsserver2003-kb914961-sp2-x86-esn_38d7fba08bdebdaf567ae626042e860bf525306e.exe
FRA-x86=http://download.windowsupdate.com/msdownload/update/software/dflt/2008/02/windowsserver2003-kb914961-sp2-x86-fra_51f76d9ebb01806f905199f83a16715e8026c095.exe
HUN-x86=http://download.windowsupdate.com/msdownload/update/software/dflt/2008/02/windowsserver2003-kb914961-sp2-x86-hun_0ac4aaf8685d74132da6256439ed5f74337cb7f5.exe
ITA-x86=http://download.windowsupdate.com/msdownload/update/software/dflt/2008/02/windowsserver2003-kb914961-sp2-x86-ita_75aa7220b0e226330a723cd27cb0f8b56e9b5f22.exe
JPN-x86=http://download.windowsupdate.com/msdownload/update/software/dflt/2008/02/windowsserver2003-kb914961-sp2-x86-jpn_af70b74d70df32c530352b75e42ce772e9bb68d2.exe
KOR-x86=http://download.windowsupdate.com/msdownload/update/software/dflt/2008/02/windowsserver2003-kb914961-sp2-x86-kor_65bcd5be738a08046f0714a108a5fa334ef08fd0.exe
NLD-x86=http://download.windowsupdate.com/msdownload/update/software/dflt/2008/02/windowsserver2003-kb914961-sp2-x86-nld_12014e84ae5c8a41cd918a6e2c97586bdee030f7.exe
PLK-x86=http://download.windowsupdate.com/msdownload/update/software/dflt/2008/02/windowsserver2003-kb914961-sp2-x86-plk_213469cc7ac58cfa82215f1e5ca6753675061b57.exe
PTB-x86=http://download.windowsupdate.com/msdownload/update/software/dflt/2008/02/windowsserver2003-kb914961-sp2-x86-ptb_73a2c9a9a28f1203aba9f1852c64247467494652.exe
PTG-x86=http://download.windowsupdate.com/msdownload/update/software/dflt/2008/02/windowsserver2003-kb914961-sp2-x86-ptg_d8b921ee4bb0e0d2831f249e99c64264ae9098db.exe
RUS-x86=http://download.windowsupdate.com/msdownload/update/software/dflt/2008/02/windowsserver2003-kb914961-sp2-x86-rus_b53c66c6cec98327d1a25b77a252dc82d984f959.exe
SVE-x86=http://download.windowsupdate.com/msdownload/update/software/dflt/2008/02/windowsserver2003-kb914961-sp2-x86-sve_fba6d5c90dc7c15ae750c98cf407a0f148bbfee5.exe
TRK-x86=http://download.windowsupdate.com/msdownload/update/software/dflt/2008/02/windowsserver2003-kb914961-sp2-x86-trk_428236b66433ce6b08c9d7a6aa6c523874a340ae.exe
ENU-x64=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windowsserver2003.windowsxp-kb914961-sp2-x64-enu_7f8e909c52d23ac8b5dbfd73f1f12d3ee0fe794c.exe
JPN-x64=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windowsserver2003.windowsxp-kb914961-sp2-x64-jpn_c725a8c4e03803b12a9ac8820e964dbc377a80dc.exe
DEU-ia64=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windowsserver2003-kb914961-sp2-ia64-deu_f6857c1bb8fc03798541a78cdc1f5bb98b456333.exe
ENU-ia64=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windowsserver2003-kb914961-sp2-ia64-enu_8856af0aa0f198a8aad2de2c1ca68240d1d49bf3.exe
FRA-ia64=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windowsserver2003-kb914961-sp2-ia64-fra_0289b81fe7ed5c1c36f87232f87b25cdb21d331d.exe
JPN-ia64=http://download.windowsupdate.com/msdownload/update/v3-19990518/cabpool/windowsserver2003-kb914961-sp2-ia64-jpn_3216b1978fd418181ecbf77eef67398edb97a106.exe
; Windows Update Agent standalone installer
[WUA]
; Pay no attention to the version numbers in the urls, they're all over the place. The keys have the
; actual versions of dlls that gets installed.
7.2.6001.788-x86=http://download.windowsupdate.com/windowsupdate/redist/standalone/7.2.6001.788/WindowsUpdateAgent30-x86.exe
7.2.6001.788-x64=http://download.windowsupdate.com/windowsupdate/redist/standalone/7.2.6001.788/WindowsUpdateAgent30-x64.exe
7.2.6001.788-ia64=http://download.windowsupdate.com/windowsupdate/redist/standalone/7.2.6001.788/WindowsUpdateAgent30-ia64.exe
7.6.7600.243-x86=http://download.windowsupdate.com/windowsupdate/redist/standalone/7.4.7600.243/WindowsUpdateAgent30-x86.exe
7.6.7600.256-x86=http://download.windowsupdate.com/windowsupdate/redist/standalone/7.6.7600.320/WindowsUpdateAgent-7.6-x86.exe
7.6.7600.256-x64=http://download.windowsupdate.com/windowsupdate/redist/standalone/7.6.7600.320/WindowsUpdateAgent-7.6-x64.exe
7.6.7600.256-ia64=http://download.windowsupdate.com/windowsupdate/redist/standalone/7.6.7600.320/WindowsUpdateAgent-7.6-ia64.exe
; Win2k
5.0.0=7.2.6001.788
5.0.1=7.2.6001.788
5.0.2=7.2.6001.788
5.0.3=7.2.6001.788
5.0.4=7.2.6001.788
; XP
5.1.0=7.2.6001.788
5.1.1=7.2.6001.788
5.1.2=7.2.6001.788
5.1.3=7.6.7600.256
5.1.3-home=7.6.7600.243
; Server 03/XP x64
5.2.0=7.2.6001.788
5.2.1=7.2.6001.788
5.2.2=7.6.7600.256
; Vista/Server 08
6.0.2=7.6.7600.256
; Vista/Server 08
[VistaSP1]
x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windows6.0-kb936330-x86_b8a3fa8f819269e37d8acde799e7a9aea3dd4529.exe
x64=http://download.windowsupdate.com/msdownload/update/software/svpk/2008/04/windows6.0-kb936330-x64_12eed6cf0a842ce2a609c622b843afc289a8f4b9.exe
; No ia64 release for Vista SP1
[VistaSP2]
x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2009/06/windows6.0-kb948465-x86_55f17352b4398ecb4f0cc20e3737631420ca1609.exe
x64=http://download.windowsupdate.com/msdownload/update/software/svpk/2009/06/windows6.0-kb948465-x64_2eedca0bfa5ae8d1b0acf2117ddc4f15ac5183c9.exe
ia64=http://download.windowsupdate.com/msdownload/update/software/svpk/2009/06/windows6.0-kb948465-ia64_1a6cd9ade213bcc056cba3b810e86f0c09c16b51.exe
[KB3205638]
x86=http://download.windowsupdate.com/d/msdownload/update/software/secu/2016/11/windows6.0-kb3205638-x86_e2211e9a6523061972decd158980301fc4c32a47.msu
x64=http://download.windowsupdate.com/d/msdownload/update/software/secu/2016/11/windows6.0-kb3205638-x64_a52aaa009ee56ca941e21a6009c00bc4c88cbb7c.msu
ia64=http://download.windowsupdate.com/d/msdownload/update/software/secu/2016/11/windows6.0-kb3205638-ia64_d6bd55663080885c712c3afb9021c7336d0be83a.msu
[KB4012583]
x86=http://download.windowsupdate.com/c/msdownload/update/software/secu/2017/02/windows6.0-kb4012583-x86_1887cb5393b62cbd2dbb6a6ff6b136e809a2fbd0.msu
x64=http://download.windowsupdate.com/c/msdownload/update/software/secu/2017/02/windows6.0-kb4012583-x64_f63c9a85aa877d86c886e432560fdcfad53b752d.msu
ia64=http://download.windowsupdate.com/c/msdownload/update/software/secu/2017/02/windows6.0-kb4012583-ia64_ab1ab96d3a3d7fbd1bf5d1cee53bf0be958c6329.msu
[KB4015195]
x86=http://download.windowsupdate.com/d/msdownload/update/software/secu/2017/03/windows6.0-kb4015195-x86_eb045e0144266b20b615f29fa581c4001ebb7852.msu
x64=http://download.windowsupdate.com/d/msdownload/update/software/secu/2017/03/windows6.0-kb4015195-x64_2e310724d86b6a43c5ae8ec659685dd6cfb28ba4.msu
ia64=http://download.windowsupdate.com/d/msdownload/update/software/secu/2017/03/windows6.0-kb4015195-ia64_0ae8f7c2ab5cf24123f6e279469674d823d20129.msu
[KB4015380]
x86=http://download.windowsupdate.com/d/msdownload/update/software/secu/2017/03/windows6.0-kb4015380-x86_3f3548db24cf61d6f47d2365c298d739e6cb069a.msu
x64=http://download.windowsupdate.com/c/msdownload/update/software/secu/2017/03/windows6.0-kb4015380-x64_959aedbe0403d160be89f4dac057e2a0cd0c6d40.msu
ia64=http://download.windowsupdate.com/c/msdownload/update/software/secu/2017/03/windows6.0-kb4015380-ia64_2a825e5f1aca191bb5f627b494838660180da2d6.msu
[KB4493730]
x86=http://download.windowsupdate.com/d/msdownload/update/software/secu/2019/04/windows6.0-kb4493730-x86_ab4368f19db796680ff445a7769886c4cdc009a0.msu
x64=http://download.windowsupdate.com/d/msdownload/update/software/secu/2019/04/windows6.0-kb4493730-x64_5cb91f4e9000383f061b80f88feffdf228c2443c.msu
ia64=http://download.windowsupdate.com/d/msdownload/update/software/secu/2019/04/windows6.0-kb4493730-ia64_024e5a390f7eace6d2e9dcaa91f09976e4d147db.msu
; IE9 for Vista
[KB971512]
x86=http://download.windowsupdate.com/msdownload/update/software/updt/2009/10/windows6.0-kb971512-x86_370c3e41e1c161ddce29676e9273e4b8bb7ba3eb.msu
x64=http://download.windowsupdate.com/msdownload/update/software/updt/2009/10/windows6.0-kb971512-x64_0b329b985437c6c572529e5fd0042b9d54aeaa0c.msu
[KB2117917]
x86=http://download.windowsupdate.com/msdownload/update/software/updt/2011/02/windows6.0-kb2117917-x86_370435d9efa6643c44d6506666b1960d56cf673a.msu
x64=http://download.windowsupdate.com/msdownload/update/software/updt/2011/02/windows6.0-kb2117917-x64_655a21758801e9648702791d7bf30f81b58884b3.msu
[IE9]
x86=http://download.windowsupdate.com/msdownload/update/software/uprl/2011/05/wu-ie9-windowsvista-x86_90e3e90e964c2769a008cbf924eefdc42413dd52.exe
x64=http://download.windowsupdate.com/msdownload/update/software/uprl/2011/03/wu-ie9-windowsvista-x64_f599c02e7e1ea8a4e1029f0e49418a8be8416367.exe
; 7/Server 08 R2
[Win7SP1]
x86=http://download.windowsupdate.com/msdownload/update/software/svpk/2011/02/windows6.1-kb976932-x86_c3516bc5c9e69fee6d9ac4f981f5b95977a8a2fa.exe
x64=http://download.windowsupdate.com/msdownload/update/software/svpk/2011/02/windows6.1-kb976932-x64_74865ef2562006e51d7f9333b4a8d45b7a749dab.exe
[KB3138612]
x86=http://download.windowsupdate.com/d/msdownload/update/software/updt/2016/02/windows6.1-kb3138612-x86_6e90531daffc13bc4e92ecea890e501e807c621f.msu
x64=http://download.windowsupdate.com/d/msdownload/update/software/updt/2016/02/windows6.1-kb3138612-x64_f7b1de8ea7cf8faf57b0138c4068d2e899e2b266.msu
ia64=http://download.windowsupdate.com/d/msdownload/update/software/updt/2016/02/windows6.1-kb3138612-ia64_4edd5410fb137382d77f468a14118fa6d1c03655.msu
[KB4474419]
x86=http://download.windowsupdate.com/c/msdownload/update/software/secu/2019/09/windows6.1-kb4474419-v3-x86_0f687d50402790f340087c576886501b3223bec6.msu
x64=http://download.windowsupdate.com/c/msdownload/update/software/secu/2019/09/windows6.1-kb4474419-v3-x64_b5614c6cea5cb4e198717789633dca16308ef79c.msu
ia64=http://download.windowsupdate.com/c/msdownload/update/software/secu/2019/09/windows6.1-kb4474419-v3-ia64_1436a990f64876332857baaafa7aeb9eadcb4fa4.msu
[KB4490628]
x86=http://download.windowsupdate.com/c/msdownload/update/software/secu/2019/03/windows6.1-kb4490628-x86_3cdb3df55b9cd7ef7fcb24fc4e237ea287ad0992.msu
x64=http://download.windowsupdate.com/c/msdownload/update/software/secu/2019/03/windows6.1-kb4490628-x64_d3de52d6987f7c8bdc2c015dca69eac96047c76e.msu
ia64=http://download.windowsupdate.com/d/msdownload/update/software/secu/2019/03/windows6.1-kb4490628-ia64_4736acd98e0a4e02f29fcdef63feacc5ac7b702b.msu
; Windows Home Server 2011
[KB2757011]
x64=http://download.windowsupdate.com/msdownload/update/software/uprl/2012/12/windows6.1-kb2757011-x64_4140355ab0b06df89668ec51432a820dff9af356.msu
; 8/Server 2012
[KB4598297]
x86=http://download.windowsupdate.com/d/msdownload/update/software/secu/2021/01/windows8-rt-kb4598297-x86_a517ea587c91af5f803b0973d40166c3e076fe5c.msu
x64=http://download.windowsupdate.com/d/msdownload/update/software/secu/2021/01/windows8-rt-kb4598297-x64_60f5c45d1216ee6ff1ab88ca03b037ac519ad0da.msu
; 8.1/Server 2012 R2
[KB3021910]
x86=http://download.windowsupdate.com/c/msdownload/update/software/updt/2015/04/windows8.1-kb3021910-x86_7e70173bec00c3d4fe3b0b8cba17b095b4ed2d20.msu
x64=http://download.windowsupdate.com/c/msdownload/update/software/updt/2015/04/windows8.1-kb3021910-x64_e291c0c339586e79c36ebfc0211678df91656c3d.msu
[ClearCompressionFlag]
x86=http://download.windowsupdate.com/c/msdownload/update/software/secu/2014/04/clearcompressionflag_220edca17ae47089fc4da060915e0df568eac4ff.exe
x64=http://download.windowsupdate.com/d/msdownload/update/software/secu/2014/04/clearcompressionflag_3104315db9d84f6a2a56b9621e89ea66a8c27604.exe
[KB2919355]
x86=http://download.windowsupdate.com/c/msdownload/update/software/crup/2014/02/windows8.1-kb2919355-x86_de9df31e42fe034c9a763328326e5852c2b4963d.msu
x64=http://download.windowsupdate.com/d/msdownload/update/software/crup/2014/02/windows8.1-kb2919355-x64_e6f4da4d33564419065a7370865faacf9b40ff72.msu
[KB2932046]
x86=http://download.windowsupdate.com/c/msdownload/update/software/crup/2014/02/windows8.1-kb2932046-x86_bfd8ca4c683ccec26355afc1f2e677f3809cb3d6.msu
x64=http://download.windowsupdate.com/d/msdownload/update/software/crup/2014/02/windows8.1-kb2932046-x64_6aee5fda6e2a6729d1fbae6eac08693acd70d985.msu
[KB2959977]
x86=http://download.windowsupdate.com/d/msdownload/update/software/secu/2014/04/windows8.1-kb2959977-x86_5ccf761a356bb143b68887f99883d8c24946d2c2.msu
x64=http://download.windowsupdate.com/c/msdownload/update/software/secu/2014/04/windows8.1-kb2959977-x64_574ba2d60baa13645b764f55069b74b2de866975.msu
[KB2937592]
x86=http://download.windowsupdate.com/d/msdownload/update/software/crup/2014/02/windows8.1-kb2937592-x86_96a3416d480bd2b54803df26b8e76cd1d0008d43.msu
x64=http://download.windowsupdate.com/c/msdownload/update/software/crup/2014/02/windows8.1-kb2937592-x64_4abc0a39c9e500c0fbe9c41282169c92315cafc2.msu
[KB2934018]
x86=http://download.windowsupdate.com/d/msdownload/update/software/secu/2014/04/windows8.1-kb2934018-x86_8fb05387836b77abbf1755185ae743c9da417e9a.msu
x64=http://download.windowsupdate.com/c/msdownload/update/software/secu/2014/04/windows8.1-kb2934018-x64_234a5fc4955f81541f5bfc0d447e4fc4934efc38.msu

166
setup/RunOnce.nsh Normal file
View File

@@ -0,0 +1,166 @@
!define IsRunOnce `"" HasFlag "/runonce"`
!define IsPostInstall `"" HasFlag "/postinstall"`
!define NoRestart `"" HasFlag "/norestart"`
!macro -PromptReboot
SetErrorLevel ${ERROR_SUCCESS_REBOOT_REQUIRED}
${If} ${NoRestart}
; Prompt for reboot
${IfNot} ${Silent}
System::Call '${RestartDialog}($HWNDPARENT, \
"Windows will be restarted to complete installation of prerequisite components. Setup will resume after the restart.", \
${EWX_REBOOT})'
${EndIf}
${Else}
; Reboot immediately
Reboot
${EndIf}
!macroend
!macro -RegisterRunOnce flags
WriteRegStr HKLM "${REGPATH_RUNONCE}" "Legacy Update" '"$RunOnceDir\LegacyUpdateSetup.exe" ${flags}'
!macroend
Function RegisterRunOnce
!insertmacro -RegisterRunOnce "/runonce"
FunctionEnd
Function un.RegisterRunOnce
; Unused, just needs to exist to make the compiler happy
FunctionEnd
Function RegisterRunOncePostInstall
!insertmacro -RegisterRunOnce "/postinstall"
FunctionEnd
!macro -WriteRegStrWithBackup root key name value
; Backup the key if it exists
ClearErrors
ReadRegStr $0 ${root} "${key}" "${name}"
${IfNot} ${Errors}
WriteRegStr ${root} "${key}" "LegacyUpdate_${name}" $0
${EndIf}
WriteRegStr ${root} "${key}" "${name}" "${value}"
!macroend
!macro -RestoreRegStr root key name
; Restore the key if it exists
ClearErrors
ReadRegStr $0 ${root} "${key}" "LegacyUpdate_${name}"
${If} ${Errors}
DeleteRegValue ${root} "${key}" "${name}"
${Else}
WriteRegStr ${root} "${key}" "${name}" $0
DeleteRegValue ${root} "${key}" "LegacyUpdate_${name}"
${EndIf}
!macroend
!macro -RebootIfRequired un
${If} ${RebootFlag}
${IfNot} ${IsRunOnce}
${AndIfNot} ${NoRestart}
!insertmacro DetailPrint "Preparing to restart..."
; Get the localised name of the Administrators group from its SID
System::Call '*(&i1 0, &i4 0, &i1 5) i .r0'
; S-1-5-32-544
System::Call '${AllocateAndInitializeSid}(r0, 2, ${SECURITY_BUILTIN_DOMAIN_RID}, ${DOMAIN_ALIAS_RID_ADMINS}, 0, 0, 0, 0, 0, 0, .r1)'
System::Free $0
System::Call '${LookupAccountSid}(0, r1, .r0, ${NSIS_MAX_STRLEN}, .r2, ${NSIS_MAX_STRLEN}, 0)'
System::Call '${FreeSid}(r1)'
; Create the admin user
ExecShellWait "" "$WINDIR\system32\net.exe" "user /add ${RUNONCE_USERNAME} ${RUNONCE_PASSWORD}" SW_HIDE
ExecShellWait "" "$WINDIR\system32\net.exe" 'localgroup /add "$0" ${RUNONCE_USERNAME}' SW_HIDE
!insertmacro -WriteRegStrWithBackup HKLM "${REGPATH_WINLOGON}" "AutoAdminLogon" "1"
!insertmacro -WriteRegStrWithBackup HKLM "${REGPATH_WINLOGON}" "DefaultDomainName" "."
!insertmacro -WriteRegStrWithBackup HKLM "${REGPATH_WINLOGON}" "DefaultUserName" "${RUNONCE_USERNAME}"
!insertmacro -WriteRegStrWithBackup HKLM "${REGPATH_WINLOGON}" "DefaultPassword" "${RUNONCE_PASSWORD}"
; Copy to runonce path to ensure installer is accessible by the temp user
CreateDirectory "$RunOnceDir"
CopyFiles /SILENT "$EXEPATH" "$RunOnceDir\LegacyUpdateSetup.exe"
; Remove mark of the web to prevent "Open File - Security Warning" dialog
System::Call '${DeleteFile}("$RunOnceDir\LegacyUpdateSetup.exe:Zone.Identifier")'
${EndIf}
Call ${un}RegisterRunOnce
!insertmacro -PromptReboot
Quit
${EndIf}
!macroend
Function RebootIfRequired
${MementoSectionSave}
!insertmacro -RebootIfRequired ""
FunctionEnd
Function un.RebootIfRequired
!insertmacro -RebootIfRequired "un."
FunctionEnd
Function OnRunOnceLogon
; Trick winlogon into thinking the shell has started, so it doesn't appear to be stuck at
; "Welcome" (XP) or "Preparing your desktop..." (Vista+)
; https://social.msdn.microsoft.com/Forums/WINDOWS/en-US/ca253e22-1ef8-4582-8710-9cd9c89b15c3
${If} ${AtLeastWinVista}
StrCpy $0 "ShellDesktopSwitchEvent"
${Else}
StrCpy $0 "msgina: ShellReadyEvent"
${EndIf}
System::Call '${OpenEvent}(${EVENT_MODIFY_STATE}, 0, "$0") .r0'
${If} $0 != 0
System::Call '${SetEvent}(r0)'
System::Call '${CloseHandle}(r0)'
${EndIf}
; Handle Safe Mode case. RunOnce can still be processed in Safe Mode in some edge cases. If that
; happens, just silently register runonce again and quit.
${If} ${IsSafeMode}
Call RegisterRunOnce
Quit
${EndIf}
; Allow the themes component to be registered if necessary. This sets the theme to Aero Basic
; rather than Classic in Vista/7.
ClearErrors
ReadRegStr $0 HKLM "${REGPATH_COMPONENT_THEMES}" "StubPath"
${IfNot} ${Errors}
ExecShellWait "" "$WINDIR\system32\cmd.exe" "/c $0" SW_HIDE
${EndIf}
FunctionEnd
Function CleanUpRunOnce
; Restore autologon keys
!insertmacro -RestoreRegStr HKLM "${REGPATH_WINLOGON}" "AutoAdminLogon"
!insertmacro -RestoreRegStr HKLM "${REGPATH_WINLOGON}" "DefaultDomainName"
!insertmacro -RestoreRegStr HKLM "${REGPATH_WINLOGON}" "DefaultUserName"
!insertmacro -RestoreRegStr HKLM "${REGPATH_WINLOGON}" "DefaultPassword"
; Delete the temp user
ExecShellWait "" "$WINDIR\system32\net.exe" "user /delete ${RUNONCE_USERNAME}" SW_HIDE
${If} ${IsRunOnce}
; Clean up temporary setup exe if we created it (likely on next reboot)
${If} ${FileExists} "$RunOnceDir"
RMDir /r /REBOOTOK "$RunOnceDir"
${EndIf}
; Be really really sure this is the right user before we nuke their profile and log out
System::Call '${GetUserName}(.r0, ${NSIS_MAX_STRLEN}) .r1'
${If} $0 == "${RUNONCE_USERNAME}"
; Register postinstall runonce for the next admin user logon, and log out of the temporary user
${IfNot} ${Abort}
Call RegisterRunOncePostInstall
${EndIf}
RMDir /r /REBOOTOK "$PROFILE"
System::Call "${ExitWindowsEx}(${EWX_FORCE}, 0) .r0"
${EndIf}
${EndIf}
FunctionEnd

82
setup/UpdateRoots.nsh Normal file
View File

@@ -0,0 +1,82 @@
!macro -SetSecureProtocolsBitmask
; If the value isn't yet set, ReadRegDword will return 0. This means TLSv1.1 and v1.2 will be the
; only enabled protocols. This is intentional behavior, because SSLv2 and SSLv3 are not secure,
; and TLSv1.0 is deprecated. The user can manually enable them in Internet Settings if needed.
; On XP, we'll also enable TLSv1.0, given TLSv1.1 and v1.2 are only offered through an optional
; POSReady 2009 update.
${If} $0 == 0
${AndIf} ${AtMostWinXP2003}
IntOp $0 $0 | ${WINHTTP_FLAG_SECURE_PROTOCOL_TLS1}
${EndIf}
IntOp $0 $0 | ${WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1}
IntOp $0 $0 | ${WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2}
!macroend
Function _ConfigureCrypto
; Enable SChannel TLSv1.1 and v1.2
WriteRegDword HKLM "${REGPATH_SCHANNEL_PROTOCOLS}\TLS 1.1\Client" "Enabled" 1
WriteRegDword HKLM "${REGPATH_SCHANNEL_PROTOCOLS}\TLS 1.1\Client" "DisabledByDefault" 0
WriteRegDword HKLM "${REGPATH_SCHANNEL_PROTOCOLS}\TLS 1.1\Server" "Enabled" 1
WriteRegDword HKLM "${REGPATH_SCHANNEL_PROTOCOLS}\TLS 1.1\Server" "DisabledByDefault" 0
WriteRegDword HKLM "${REGPATH_SCHANNEL_PROTOCOLS}\TLS 1.2\Client" "Enabled" 1
WriteRegDword HKLM "${REGPATH_SCHANNEL_PROTOCOLS}\TLS 1.2\Client" "DisabledByDefault" 0
WriteRegDword HKLM "${REGPATH_SCHANNEL_PROTOCOLS}\TLS 1.2\Server" "Enabled" 1
WriteRegDword HKLM "${REGPATH_SCHANNEL_PROTOCOLS}\TLS 1.2\Server" "DisabledByDefault" 0
; Enable IE TLSv1.1 and v1.2
ReadRegDword $0 HKLM "${REGPATH_INETSETTINGS}" "SecureProtocols"
!insertmacro -SetSecureProtocolsBitmask
WriteRegDword HKLM "${REGPATH_INETSETTINGS}" "SecureProtocols" $0
ReadRegDword $0 HKCU "${REGPATH_INETSETTINGS}" "SecureProtocols"
!insertmacro -SetSecureProtocolsBitmask
WriteRegDword HKCU "${REGPATH_INETSETTINGS}" "SecureProtocols" $0
; Enable WinHTTP TLSv1.1 and v1.2
ReadRegDword $0 HKLM "${REGPATH_INETSETTINGS}\WinHttp" "DefaultSecureProtocols"
!insertmacro -SetSecureProtocolsBitmask
WriteRegDword HKLM "${REGPATH_INETSETTINGS}\WinHttp" "DefaultSecureProtocols" $0
ReadRegDword $0 HKCU "${REGPATH_INETSETTINGS}\WinHttp" "DefaultSecureProtocols"
!insertmacro -SetSecureProtocolsBitmask
WriteRegDword HKCU "${REGPATH_INETSETTINGS}\WinHttp" "DefaultSecureProtocols" $0
; Enable .NET inheriting SChannel protocol config
; .NET 3 uses the same registry keys as .NET 2.
WriteRegDword HKLM "${REGPATH_DOTNET_V2}" "SystemDefaultTlsVersions" 1
WriteRegDword HKLM "${REGPATH_DOTNET_V4}" "SystemDefaultTlsVersions" 1
FunctionEnd
Function ConfigureCrypto
Call _ConfigureCrypto
; Repeat in the WOW64 registry if needed
${If} ${RunningX64}
SetRegView 32
Call _ConfigureCrypto
SetRegView 64
${EndIf}
FunctionEnd
!macro _DownloadSST name
!insertmacro Download "Certificate Trust List" "${TRUSTEDR}/${name}.sst" "${name}.sst" 0
!macroend
Function DownloadRoots
!insertmacro DetailPrint "Downloading Certificate Trust List..."
!insertmacro _DownloadSST "authroots"
!insertmacro _DownloadSST "delroots"
!insertmacro _DownloadSST "roots"
!insertmacro _DownloadSST "updroots"
!insertmacro _DownloadSST "disallowedcert"
FunctionEnd
Function UpdateRoots
File "updroots.exe"
!insertmacro DetailPrint "Installing Certificate Trust List..."
!insertmacro ExecWithErrorHandling "Certificate Trust List" '"$OUTDIR\updroots.exe" authroots.sst' 0
!insertmacro ExecWithErrorHandling "Certificate Trust List" '"$OUTDIR\updroots.exe" updroots.sst' 0
!insertmacro ExecWithErrorHandling "Certificate Trust List" '"$OUTDIR\updroots.exe" -l roots.sst' 0
!insertmacro ExecWithErrorHandling "Certificate Trust List" '"$OUTDIR\updroots.exe" -d delroots.sst' 0
!insertmacro ExecWithErrorHandling "Certificate Trust List" '"$OUTDIR\updroots.exe" -l -u disallowedcert.sst' 0
FunctionEnd

69
setup/Win32.nsh Normal file
View File

@@ -0,0 +1,69 @@
; advapi32
!define SECURITY_BUILTIN_DOMAIN_RID 0x00000020
!define DOMAIN_ALIAS_RID_ADMINS 0x00000220
!define AllocateAndInitializeSid 'advapi32::AllocateAndInitializeSid(i, i, i, i, i, i, i, i, i, i, *i) i'
!define LookupAccountSid 'advapi32::LookupAccountSid(i, i, t, *i, t, *i, *i) i'
!define FreeSid 'advapi32::FreeSid(i)'
!define GetUserName 'advapi32::GetUserName(t, *i) i'
; kernel32
!define PF_XMMI64_INSTRUCTIONS_AVAILABLE 10
!define ES_CONTINUOUS 0x80000000
!define ES_SYSTEM_REQUIRED 0x00000001
!define GetVersionEx 'kernel32::GetVersionEx(pr) i'
!define GetLogicalProcessorInformationEx 'kernel32::GetLogicalProcessorInformationEx(i, *i, *i) i'
!define SetThreadExecutionState 'kernel32::SetThreadExecutionState(i) i'
!define OpenEvent 'kernel32::OpenEvent(i, i, t) i'
!define SetEvent 'kernel32::SetEvent(i) i'
!define CloseHandle 'kernel32::CloseHandle(i) i'
!define DeleteFile 'kernel32::DeleteFile(t) i'
; netapi32
!define NetApiBufferFree 'netapi32::NetApiBufferFree(i) i'
!define NetUserGetInfo 'netapi32::NetUserGetInfo(t, t, i, *i) i'
!define NetUserAdd 'netapi32::NetUserAdd(t, i, t, i, *i) i'
!define NetLocalGroupAddMembers 'netapi32::NetLocalGroupAddMembers(t, t, i, *i, i) i'
; ole32
!define CoCreateInstance 'ole32::CoCreateInstance(g, p, i, g, *p) i'
!define CoTaskMemFree 'ole32::CoTaskMemFree(p)'
; oleaut32
!define SysAllocString 'oleaut32::SysAllocString(t) p'
!define SysFreeString 'oleaut32::SysFreeString(p)'
; shell32
!define IsUserAnAdmin 'shell32::IsUserAnAdmin() i'
!define RestartDialog 'shell32::RestartDialog(p, t, i) i'
; user32
!define EWX_REBOOT 0x02
!define EWX_FORCE 0x04
!define ExitWindowsEx 'user32::ExitWindowsEx(i, i) i'
!define GetSystemMetrics 'user32::GetSystemMetrics(i) i'
; winhttp
!define WINHTTP_FLAG_SECURE_PROTOCOL_TLS1 0x00000080
!define WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1 0x00000200
!define WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2 0x00000800
!define ERROR_INTERNET_OPERATION_CANCELLED 12017
; wininet
!define INTERNET_FLAG_RELOAD 0x80000000
!define INTERNET_FLAG_NO_CACHE_WRITE 0x04000000
!define INTERNET_FLAG_KEEP_CONNECTION 0x00400000
!define INTERNET_FLAG_NO_COOKIES 0x00080000
!define INTERNET_FLAG_NO_UI 0x00000200
!define SECURITY_FLAG_STRENGTH_STRONG 0x20000000
; wuapi
!define WU_S_ALREADY_INSTALLED 2359302 ; 0x00240006
!define WU_E_NOT_APPLICABLE -2145124329 ; 0x80240017
!define WU_MU_SERVICE_ID "7971f918-a847-4430-9279-4a52d1efe18d"

173
setup/WinVer.nsh Normal file
View File

@@ -0,0 +1,173 @@
; NSIS WinVer.nsh rewritten to work more like what I expect.
!include LogicLib.nsh
!include Util.nsh
; Defines
!define OSVERSIONINFOW_SIZE 276
!define OSVERSIONINFOEXW_SIZE 284
!define WINVER_2000 0x0500 ; 5.0.2195
!define WINVER_XP 0x0501 ; 5.1.2600
!define WINVER_XP2002 0x0501 ; 5.1.2600
!define WINVER_XP2003 0x0502 ; 5.2.3790
!define WINVER_VISTA 0x0600 ; 6.0.6000
!define WINVER_7 0x0601 ; 6.1.7600
!define WINVER_8 0x0602 ; 6.2.9200
!define WINVER_8.1 0x0603 ; 6.3.9600
!define WINVER_10 0x0A00 ; 10.0.10240
!define WINVER_SERVER_2000 ${WINVER_2000}
!define WINVER_SERVER_2003 ${WINVER_XP2003}
!define WINVER_SERVER_2003R2 ${WINVER_XP2003}
!define WINVER_SERVER_2008 ${WINVER_VISTA}
!define WINVER_SERVER_2008R2 ${WINVER_7}
!define WINVER_SERVER_2012 ${WINVER_8}
!define WINVER_SERVER_2012R2 ${WINVER_8.1}
!define WINVER_SERVER_2016 ${WINVER_10}
!define WINVER_BUILD_11 22000
!define /ifndef VER_NT_WORKSTATION 1
!define VER_SUITE_BACKOFFICE 0x00000004 ; Microsoft BackOffice
!define VER_SUITE_BLADE 0x00000400 ; Windows Server 2003, Web Edition
!define VER_SUITE_COMPUTE_SERVER 0x00004000 ; Windows Server 2003, Compute Cluster Edition
!define VER_SUITE_DATACENTER 0x00000080 ; Windows Server Datacenter
!define VER_SUITE_ENTERPRISE 0x00000002 ; Windows Server Enterprise
!define VER_SUITE_EMBEDDEDNT 0x00000040 ; Windows Embedded
!define VER_SUITE_PERSONAL 0x00000200 ; Windows Home Edition
!define VER_SUITE_SINGLEUSERTS 0x00000100 ; Single-user Remote Desktop
!define VER_SUITE_SMALLBUSINESS 0x00000001 ; Small Business Server
!define VER_SUITE_SMALLBUSINESS_RESTRICTED 0x00000020 ; Small Business Server (restrictive client license)
!define VER_SUITE_STORAGE_SERVER 0x00002000 ; Windows Storage Server 2003
!define VER_SUITE_TERMINAL 0x00000010 ; Terminal Services (always true)
!define VER_SUITE_WH_SERVER 0x00008000 ; Windows Home Server
!define VER_SUITE_MULTIUSERTS 0x00020000 ; Multi-user Remote Desktop
!define SM_CLEANBOOT 67
; Init
!macro __WinVer_Init
!ifndef __WINVER_VARS_DECLARED
!define __WINVER_VARS_DECLARED
Var /GLOBAL __WINVEROS
Var /GLOBAL __WINVERBUILD
Var /GLOBAL __WINVERSP
Var /GLOBAL __WINVERPROD
Var /GLOBAL __WINVERSUITE
!endif
StrCmp $__WINVEROS "" _winver_noveryet
Return
_winver_noveryet:
GetWinVer $__WINVEROS NTDDIMajMin
GetWinVer $__WINVERBUILD Build
GetWinVer $__WINVERSP ServicePack
GetWinVer $__WINVERPROD Product
Push $0
Push $1
System::Alloc ${OSVERSIONINFOEXW_SIZE}
Pop $0
System::Call '*$0(i ${OSVERSIONINFOEXW_SIZE})'
System::Call '${GetVersionEx}(.r0)'
System::Call '*$0(i, i, i, i, i, &t128, h, h, h .r1, b, b)'
System::Free $0
StrCpy $__WINVERSUITE $1
Pop $1
Pop $0
!macroend
; Tests
!macro __WinVer_TestOS op num _t _f
${CallArtificialFunction} __WinVer_Init
!insertmacro _${op} $__WINVEROS ${num} `${_t}` `${_f}`
!macroend
!macro __WinVer_TestBuild op num _t _f
${CallArtificialFunction} __WinVer_Init
!insertmacro _${op} $__WINVERBUILD ${num} `${_t}` `${_f}`
!macroend
!macro __WinVer_TestSP op num _t _f
${CallArtificialFunction} __WinVer_Init
!insertmacro _${op} $__WINVERSP ${num} `${_t}` `${_f}`
!macroend
!macro __WinVer_TestProduct op num _t _f
${CallArtificialFunction} __WinVer_Init
!insertmacro _${op} $__WINVERPROD ${num} `${_t}` `${_f}`
!macroend
!macro __WinVer_TestSuite _a num _t _f
!insertmacro _LOGICLIB_TEMP
${CallArtificialFunction} __WinVer_Init
IntOp $_LOGICLIB_TEMP $__WINVERSUITE & ${num}
!insertmacro _= $_LOGICLIB_TEMP ${num} `${_t}` `${_f}`
!macroend
!macro __WinVer_TestSystemMetric op metric _t _f
!insertmacro _LOGICLIB_TEMP
${CallArtificialFunction} __WinVer_Init
System::Call '${GetSystemMetrics}(${metric}) .s'
Pop $_LOGICLIB_TEMP
!insertmacro _${op} $_LOGICLIB_TEMP 0 `${_t}` `${_f}`
!macroend
; Defines
!define IsClientOS `= _WinVer_TestProduct ${VER_NT_WORKSTATION}`
!define IsServerOS `!= _WinVer_TestProduct ${VER_NT_WORKSTATION}`
!define IsHomeEdition `"" _WinVer_TestSuite ${VER_SUITE_PERSONAL}`
!define IsEmbedded `"" _WinVer_TestSuite ${VER_SUITE_EMBEDDEDNT}`
!define IsHomeServer `"" _WinVer_TestSuite ${VER_SUITE_WH_SERVER}`
!define IsSafeMode `!= _WinVer_TestSystemMetric ${SM_CLEANBOOT}`
!define IsServicePack `= _WinVer_TestSP`
!define AtLeastServicePack `>= _WinVer_TestSP`
!define AtMostServicePack `<= _WinVer_TestSP`
!macro __WinVer_DefineClient os
!define IsWin${os} `= _WinVer_TestOS ${WINVER_${os}}`
!define AtLeastWin${os} `>= _WinVer_TestOS ${WINVER_${os}}`
!define AtMostWin${os} `<= _WinVer_TestOS ${WINVER_${os}}`
!macroend
!macro __WinVer_DefineServer os
!define IsWin${os} `= _WinVer_TestOS ${WINVER_SERVER_${os}}`
!define AtLeastWin${os} `>= _WinVer_TestOS ${WINVER_SERVER_${os}}`
!define AtMostWin${os} `<= _WinVer_TestOS ${WINVER_SERVER_${os}}`
!macroend
!macro __WinVer_DefineBuild os
!define IsWin${os} `= _WinVer_TestBuild ${WINVER_BUILD_${os}}`
!define AtLeastWin${os} `>= _WinVer_TestBuild ${WINVER_BUILD_${os}}`
!define AtMostWin${os} `<= _WinVer_TestBuild ${WINVER_BUILD_${os}}`
!macroend
!insertmacro __WinVer_DefineClient 2000
!insertmacro __WinVer_DefineClient XP2002
!insertmacro __WinVer_DefineClient XP2003
!insertmacro __WinVer_DefineClient Vista
!insertmacro __WinVer_DefineClient 7
!insertmacro __WinVer_DefineClient 8
!insertmacro __WinVer_DefineClient 8.1
!insertmacro __WinVer_DefineClient 10
!insertmacro __WinVer_DefineServer 2003
!insertmacro __WinVer_DefineServer 2003R2
!insertmacro __WinVer_DefineServer 2008
!insertmacro __WinVer_DefineServer 2008R2
!insertmacro __WinVer_DefineServer 2012
!insertmacro __WinVer_DefineServer 2012R2
!insertmacro __WinVer_DefineServer 2016
!insertmacro __WinVer_DefineBuild 11

View File

@@ -0,0 +1,20 @@
.Set CabinetNameTemplate=lucontrl.cab
.Set CompressionType=MSZIP
.Set CompressionLevel=7
.Set InfFileName=lucontrl_layout.inf
.Set MaxDiskSize=CDROM
.Set ReservePerCabinetSize=6144
.Set InfCabinetLineFormat=*cab#*=Application Source Media,*cabfile*,0
.Set Compress=on
.Set CompressionMemory=21
.Set DiskDirectoryTemplate=
.Set Cabinet=ON
.Set MaxCabinetSize=999999999
.Set InfDiskHeader=
.Set InfDiskLineFormat=
.Set InfCabinetHeader=[SourceDisksNames]
.Set InfFileHeader=
.Set InfFileHeader1=[SourceDisksFiles]
.Set InfFileLineFormat=*file*=*cab#*,,*size*,*csum*
setup.inf
setup.exe

9
setup/codebase/setup.inf Normal file
View File

@@ -0,0 +1,9 @@
[Version]
Signature="$CHICAGO$"
AdvancedINF=2.0
[Setup Hooks]
setup=setup
[setup]
run="%EXTRACT_DIR%\setup.exe" /activex

1
setup/codebase/test.html Normal file
View File

@@ -0,0 +1 @@
<object classid="CLSID:AD28E0DF-5F5A-40B5-9432-85EFD97D1F9F" codebase="/lucontrl.cab#version=1,9,0,0" viewastext></object>

89
setup/ie6setupstub.nsi Normal file
View File

@@ -0,0 +1,89 @@
; Stub file used to replace the ie6setup_w2k.exe file that was previously hosted by Legacy Update.
; This was a full copy of IE6 SP1, but only for English installations of Windows 2000.
; This is expected to ONLY be run by Legacy Update 1.5 and earlier. It should not be used directly.
!define MUI_UI "modern_aerowizard.exe"
!define MUI_UI_HEADERIMAGE "modern_aerowizard.exe"
!define MUI_CUSTOMFUNCTION_GUIINIT OnShow
!include Constants.nsh
Name "${NAME}"
Caption "${NAME} - Internet Explorer 6 Downloader"
BrandingText "${NAME} ${VERSION} - ${DOMAIN}"
OutFile "ie6setupstub-${VERSION}.exe"
Unicode True
RequestExecutionLevel Admin
AutoCloseWindow true
VIAddVersionKey /LANG=1033 "ProductName" "${NAME} - Internet Explorer 6 Downloader"
VIAddVersionKey /LANG=1033 "ProductVersion" "${LONGVERSION}"
VIAddVersionKey /LANG=1033 "CompanyName" "Hashbang Productions"
VIAddVersionKey /LANG=1033 "LegalCopyright" "© Hashbang Productions. All rights reserved."
VIAddVersionKey /LANG=1033 "FileDescription" "${NAME} - Internet Explorer 6 Downloader"
VIAddVersionKey /LANG=1033 "FileVersion" "${LONGVERSION}"
VIProductVersion ${LONGVERSION}
VIFileVersion ${LONGVERSION}
!define MUI_ICON "..\icon.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "setupbanner.bmp"
!include FileFunc.nsh
!include LogicLib.nsh
!include MUI2.nsh
!include Win\WinNT.nsh
!include WinCore.nsh
!include WinVer.nsh
!include WordFunc.nsh
!include x64.nsh
!include Common.nsh
!include AeroWizard.nsh
!include Download2KXP.nsh
!insertmacro GetParameters
!insertmacro GetOptions
!define MUI_PAGE_HEADER_TEXT "Performing Actions"
!define MUI_PAGE_CUSTOMFUNCTION_SHOW OnShow
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
Function OnShow
Call AeroWizardOnShow
FunctionEnd
Section "Internet Explorer 6.0 Service Pack 1" IE6SP1
SectionIn Ro
Call DownloadIE6
Call InstallIE6
SectionEnd
Function .onInit
SetShellVarContext All
!insertmacro EnsureAdminRights
SetDetailsPrint listonly
${IfNot} ${IsWin2000}
MessageBox MB_USERICON "This tool is intended only for use on Windows 2000." /SD IDOK
Quit
${EndIf}
Call NeedsIE6
Pop $0
${If} $0 == 0
MessageBox MB_USERICON "Internet Explorer 6 Service Pack 1 is already installed." /SD IDOK
Quit
${EndIf}
SetOutPath $PLUGINSDIR
File Patches.ini
SetErrorLevel ${ERROR_SUCCESS_REBOOT_REQUIRED}
FunctionEnd

BIN
setup/modern_aerowizard.exe Normal file

Binary file not shown.

944
setup/setup.nsi Normal file
View File

@@ -0,0 +1,944 @@
!include Constants.nsh
Name "${NAME}"
Caption "${NAME}"
BrandingText "${NAME} ${VERSION} - ${DOMAIN}"
OutFile "WUIsBack-latest.exe"
InstallDir "$PROGRAMFILES\${NAME}"
InstallDirRegKey HKLM "${REGPATH_LEGACYUPDATE_SETUP}" "InstallDir"
Unicode true
RequestExecutionLevel admin
AutoCloseWindow true
ManifestSupportedOS all
ManifestDPIAware true
AllowSkipFiles off
SetCompressor /SOLID lzma
VIAddVersionKey /LANG=1033 "ProductName" "${NAME}"
VIAddVersionKey /LANG=1033 "ProductVersion" "${LONGVERSION}"
VIAddVersionKey /LANG=1033 "CompanyName" "Hashbang Productions and Vichingo455"
VIAddVersionKey /LANG=1033 "LegalCopyright" "${U+00A9} Hashbang Productions and Vichingo455. All rights reserved."
VIAddVersionKey /LANG=1033 "FileDescription" "${NAME}"
VIAddVersionKey /LANG=1033 "FileVersion" "${LONGVERSION}"
VIProductVersion ${LONGVERSION}
VIFileVersion ${LONGVERSION}
!define MUI_UI "modern_aerowizard.exe"
!define MUI_UI_HEADERIMAGE "modern_aerowizard.exe"
!define MUI_CUSTOMFUNCTION_GUIINIT OnShow
!define MUI_CUSTOMFUNCTION_UNGUIINIT un.OnShow
!define MUI_CUSTOMFUNCTION_ABORT CleanUp
!define MUI_ICON "..\LegacyUpdate\icon.ico"
!define MUI_UNICON "..\LegacyUpdate\icon.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "setupbanner.bmp"
!define MUI_HEADERIMAGE_UNBITMAP "setupbanner.bmp"
!define MUI_TEXT_ABORT_TITLE "Installation Failed"
!define MEMENTO_REGISTRY_ROOT HKLM
!define MEMENTO_REGISTRY_KEY "${REGPATH_LEGACYUPDATE_SETUP}"
Var /GLOBAL InstallDir
Var /GLOBAL RunOnceDir
!include FileFunc.nsh
!include Integration.nsh
!include LogicLib.nsh
!include Memento.nsh
!include MUI2.nsh
!include Sections.nsh
!include Win\COM.nsh
!include Win\WinError.nsh
!include Win\WinNT.nsh
!include WinCore.nsh
!include WinMessages.nsh
!include WinVer.nsh
!include WordFunc.nsh
!include x64.nsh
!include Win32.nsh
!include Common.nsh
!include AeroWizard.nsh
!include Download2KXP.nsh
!include DownloadVista7.nsh
!include Download8.nsh
!include DownloadWUA.nsh
!include RunOnce.nsh
!include UpdateRoots.nsh
!include 7zip.nsh
!insertmacro GetParameters
!insertmacro GetOptions
!define MUI_PAGE_HEADER_TEXT "Welcome to WUIsBack"
!define MUI_COMPONENTSPAGE_TEXT_TOP "Select what you would like WUIsBack to do. An internet connection is required to download additional components from Microsoft. Your computer will restart automatically if needed. Close all other programs before continuing."
!define MUI_PAGE_CUSTOMFUNCTION_PRE ComponentsPageCheck
!define MUI_PAGE_CUSTOMFUNCTION_SHOW OnShow
!define MUI_PAGE_FUNCTION_GUIINIT OnShow
!define MUI_CUSTOMFUNCTION_ONMOUSEOVERSECTION OnMouseOverSection
!insertmacro MUI_PAGE_COMPONENTS
!define MUI_PAGE_HEADER_TEXT "Performing Actions"
!define MUI_PAGE_CUSTOMFUNCTION_SHOW OnShow
!insertmacro MUI_PAGE_INSTFILES
!define MUI_PAGE_HEADER_TEXT "Uninstall WUIsBack"
!define MUI_UNCONFIRMPAGE_TEXT_TOP "WUIsBack will be uninstalled. Your Windows Update configuration will be reset to directly use Microsoft servers."
!define MUI_PAGE_CUSTOMFUNCTION_SHOW un.OnShow
!insertmacro MUI_UNPAGE_CONFIRM
!define MUI_PAGE_HEADER_TEXT "Performing Actions"
!define MUI_PAGE_CUSTOMFUNCTION_SHOW un.OnShow
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
!macro RestartWUAUService
!insertmacro DetailPrint "Restarting Windows Update service..."
SetDetailsPrint none
ExecShellWait "" "$WINDIR\system32\net.exe" "stop wuauserv" SW_HIDE
SetDetailsPrint listonly
!macroend
Function OnShow
Call AeroWizardOnShow
FunctionEnd
Function un.OnShow
Call un.AeroWizardOnShow
FunctionEnd
Section -BeforeInstall
!insertmacro InhibitSleep 1
SectionEnd
Section -PreDownload
${IfNot} ${IsRunOnce}
${AndIfNot} ${IsPostInstall}
Call PreDownload
${EndIf}
SectionEnd
Section - PREREQS_START
SectionEnd
; Win2k prerequisities
Section "Windows 2000 Service Pack 4" W2KSP4
SectionIn Ro
Call InstallW2KSP4
Call InstallKB835732
Call RebootIfRequired
SectionEnd
Section "Internet Explorer 6.0 Service Pack 1" IE6SP1
SectionIn Ro
Call InstallIE6
Call RebootIfRequired
SectionEnd
Section "7-Zip File Manager" 7ZIP
Call Install7Zip
SectionEnd
; XP 2002 prerequisities
${MementoSection} "Windows XP Service Pack 3" XPSP3
Call InstallXPSP2
Call RebootIfRequired
Call InstallXPSP3
Call RebootIfRequired
${MementoSectionEnd}
${MementoSection} "Windows XP Embedded Service Pack 3" XPESP3
Call InstallXPESP3
Call RebootIfRequired
${MementoSectionEnd}
; XP 2003 prerequisities
${MementoSection} "Windows XP/Server 2003 Service Pack 2" 2003SP2
Call Install2003SP2
Call RebootIfRequired
${MementoSectionEnd}
; Vista prerequisities
Section "Windows Vista Service Pack 2" VISTASP2
SectionIn Ro
Call InstallVistaSP1
Call RebootIfRequired
Call InstallVistaSP2
Call RebootIfRequired
SectionEnd
Section "Windows Servicing Stack update" VISTASSU
SectionIn Ro
Call InstallKB3205638
Call InstallKB4012583
Call InstallKB4015195
Call InstallKB4015380
Call InstallKB4493730
Call RebootIfRequired
SectionEnd
${MementoSection} "Internet Explorer 9" VISTAIE9
Call InstallKB971512
Call InstallKB2117917
Call RebootIfRequired
Call InstallIE9
Call RebootIfRequired
${MementoSectionEnd}
; 7 prerequisities
Section "Windows 7 Service Pack 1" WIN7SP1
SectionIn Ro
Call InstallWin7SP1
Call RebootIfRequired
SectionEnd
Section "Windows Servicing Stack update" WIN7SSU
SectionIn Ro
Call InstallKB3138612
Call InstallKB4474419
Call InstallKB4490628
Call RebootIfRequired
SectionEnd
; Windows Home Server 2011 (Server 2008 R2) prerequisites
Section "Windows Home Server Update Rollup 4" WHS2011U4
SectionIn Ro
Call InstallKB2757011
Call RebootIfRequired
SectionEnd
; 8 prerequisities
Section "Windows Servicing Stack update" WIN8SSU
SectionIn Ro
Call InstallKB4598297
Call RebootIfRequired
SectionEnd
Section "Windows 8.1" WIN81UPGRADE
; No-op; we'll launch the support site in post-install.
SectionEnd
; 8.1 prerequisities
Section "Windows 8.1 Update 1" WIN81UPDATE1
SectionIn Ro
Call InstallKB3021910
Call InstallClearCompressionFlag
Call InstallKB2919355
Call InstallKB2932046
Call InstallKB2959977
Call InstallKB2937592
Call InstallKB2934018
Call RebootIfRequired
SectionEnd
Section "Windows Servicing Stack update" WIN81SSU
SectionIn Ro
Call InstallKB3021910
Call RebootIfRequired
SectionEnd
; Shared prerequisites
Section "Windows Update Agent update" WUA
SectionIn Ro
Call InstallWUA
SectionEnd
${MementoUnselectedSection} "Enable Windows Embedded 2009 updates" WES09
WriteRegDword HKLM "${REGPATH_POSREADY}" "Installed" 1
${MementoSectionEnd}
${MementoSection} "Update root certificates store" ROOTCERTS
Call ConfigureCrypto
${IfNot} ${IsPostInstall}
Call UpdateRoots
${EndIf}
${MementoSectionEnd}
${MementoSection} "Enable Microsoft Update" WIN7MU
LegacyUpdateNSIS::EnableMicrosoftUpdate
Pop $0
${If} $0 != 0
LegacyUpdateNSIS::MessageForHresult $0
Pop $0
MessageBox MB_USERICON "Failed to enable Microsoft Update.$\r$\n$\r$\n$0" /SD IDOK
${EndIf}
!insertmacro RestartWUAUService
${MementoSectionEnd}
${MementoSection} "Activate Windows" ACTIVATE
; No-op; we'll launch the activation wizard in post-install.
${MementoSectionEnd}
Section - PREREQS_END
SectionEnd
; Main installation
${MementoSection} "WUIsBack" LEGACYUPDATE
SetOutPath $InstallDir
WriteUninstaller "$OUTDIR\Uninstall.exe"
; Add uninstall entry
WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "DisplayName" "${NAME}"
WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "DisplayIcon" '"$OUTDIR\LegacyUpdate.dll",-201'
WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "DisplayVersion" "${VERSION}"
WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "Publisher" "${NAME}"
WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "URLInfoAbout" "${WEBSITE}"
WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "UninstallString" '"$OUTDIR\Uninstall.exe"'
WriteRegStr HKLM "${REGPATH_UNINSTSUBKEY}" "QuietUninstallString" '"$OUTDIR\Uninstall.exe" /S'
WriteRegDword HKLM "${REGPATH_UNINSTSUBKEY}" "NoModify" 1
WriteRegDword HKLM "${REGPATH_UNINSTSUBKEY}" "NoRepair" 1
; Add Control Panel entry
; Category 5: XP Performance and Maintenance, Vista System and Maintenance, 7+ System and Security
; Category 10: XP SP2 Security Center, Vista Security, 7+ System and Security
WriteRegStr HKCR "${REGPATH_CPLCLSID}" "" "${NAME}"
WriteRegStr HKCR "${REGPATH_CPLCLSID}" "LocalizedString" '@"$OUTDIR\LegacyUpdate.dll",-2'
WriteRegStr HKCR "${REGPATH_CPLCLSID}" "InfoTip" '@"$OUTDIR\LegacyUpdate.dll",-4'
WriteRegStr HKCR "${REGPATH_CPLCLSID}\DefaultIcon" "" '"$OUTDIR\LegacyUpdate.dll",-201'
WriteRegStr HKCR "${REGPATH_CPLCLSID}\Shell\Open\Command" "" 'rundll32.exe "$OUTDIR\LegacyUpdate.dll",LaunchUpdateSite'
WriteRegDword HKCR "${REGPATH_CPLCLSID}\ShellFolder" "Attributes" 0
WriteRegDword HKCR "${REGPATH_CPLCLSID}" "{305CA226-D286-468e-B848-2B2E8E697B74} 2" 5
WriteRegStr HKCR "${REGPATH_CPLCLSID}" "System.ApplicationName" "${CPL_APPNAME}"
WriteRegStr HKCR "${REGPATH_CPLCLSID}" "System.ControlPanelCategory" "5,10"
WriteRegStr HKCR "${REGPATH_CPLCLSID}" "System.Software.TasksFileUrl" "$OUTDIR\LegacyUpdate.dll,-202"
WriteRegStr HKLM "${REGPATH_CPLNAMESPACE}" "" "${NAME}"
; Install DLL, with detection for it being in use by IE
; NOTE: Here we specifically check for amd64, because the DLL is amd64.
; We still install to native Program Files on IA64, but with x86 binaries.
SetOverwrite try
!insertmacro TryFile "..\Release\LegacyUpdate.dll" "$OUTDIR\LegacyUpdate.dll"
${If} ${IsNativeAMD64}
${If} ${FileExists} "$OUTDIR\LegacyUpdate32.dll"
!insertmacro TryDelete "$OUTDIR\LegacyUpdate32.dll"
${EndIf}
!insertmacro TryRename "$OUTDIR\LegacyUpdate.dll" "$OUTDIR\LegacyUpdate32.dll"
!insertmacro TryFile "..\x64\Release\LegacyUpdate.dll" "$OUTDIR\LegacyUpdate.dll"
${EndIf}
SetOverwrite on
; Register DLL
${If} ${IsNativeAMD64}
!insertmacro RegisterDLL "" x64 "$OUTDIR\LegacyUpdate.dll"
!insertmacro RegisterDLL "" x86 "$OUTDIR\LegacyUpdate32.dll"
${Else}
!insertmacro RegisterDLL "" x86 "$OUTDIR\LegacyUpdate.dll"
${EndIf}
; Create shortcut
CreateShortcut "$COMMONSTARTMENU\${NAME}.lnk" \
"$SYSDIR\rundll32.exe" '"$OUTDIR\LegacyUpdate.dll",LaunchUpdateSite' \
"$OUTDIR\LegacyUpdate.dll" 0 \
SW_SHOWNORMAL "" \
'@"$OUTDIR\LegacyUpdate.dll",-4'
; Hide WU shortcuts
; TODO: How can we consistently find the shortcuts for non-English installs?
${If} ${AtMostWinXP2003}
${If} ${FileExists} "$COMMONSTARTMENU\Windows Update.lnk"
CreateDirectory "$OUTDIR\Backup"
Rename "$COMMONSTARTMENU\Windows Update.lnk" "$OUTDIR\Backup\Windows Update.lnk"
${EndIf}
${If} ${FileExists} "$COMMONSTARTMENU\Microsoft Update.lnk"
CreateDirectory "$OUTDIR\Backup"
Rename "$COMMONSTARTMENU\Microsoft Update.lnk" "$OUTDIR\Backup\Microsoft Update.lnk"
${EndIf}
${EndIf}
; Add to trusted sites
WriteRegDword HKCU "${REGPATH_ZONEDOMAINS}\${DOMAIN}" "http" 2
WriteRegDword HKCU "${REGPATH_ZONEDOMAINS}\${DOMAIN}" "https" 2
WriteRegDword HKCU "${REGPATH_ZONEESCDOMAINS}\${DOMAIN}" "http" 2
WriteRegDword HKCU "${REGPATH_ZONEESCDOMAINS}\${DOMAIN}" "https" 2
; Delete LegacyUpdate.dll in System32 from 1.0 installer
${If} ${FileExists} $WINDIR\System32\LegacyUpdate.dll
Delete $WINDIR\System32\LegacyUpdate.dll
${EndIf}
; Delete LegacyUpdate.inf from 1.0 installer
${If} ${FileExists} $WINDIR\inf\LegacyUpdate.inf
Delete $WINDIR\inf\LegacyUpdate.inf
${EndIf}
; If 32-bit Legacy Update exists, move it to 64-bit Program Files
${If} ${RunningX64}
${AndIf} ${FileExists} "$PROGRAMFILES32\Legacy Update\Backup"
CreateDirectory "$PROGRAMFILES64\Legacy Update"
Rename "$PROGRAMFILES32\Legacy Update\Backup" "$PROGRAMFILES64\Legacy Update\Backup"
RMDir /r "$PROGRAMFILES32\Legacy Update"
${EndIf}
; Set WSUS server
; Check if Schannel is going to work with modern TLS
!insertmacro DetailPrint "Checking SSL connectivity..."
!insertmacro DownloadRequest "${WSUS_SERVER_HTTPS}/ClientWebService/ping.bin" NONE \
`/TIMEOUTCONNECT 0 /TIMEOUTRECONNECT 0`
Pop $0
Call DownloadWaitSilent
Pop $0
Pop $0
${If} $0 == "OK"
; HTTPS will work
WriteRegStr HKLM "${REGPATH_WUPOLICY}" "WUServer" "${WSUS_SERVER_HTTPS}"
WriteRegStr HKLM "${REGPATH_WUPOLICY}" "WUStatusServer" "${WSUS_SERVER_HTTPS}"
WriteRegStr HKLM "${REGPATH_WU}" "URL" "${UPDATE_URL_HTTPS}"
${Else}
; Probably not supported; use HTTP
WriteRegStr HKLM "${REGPATH_WUPOLICY}" "WUServer" "${WSUS_SERVER}"
WriteRegStr HKLM "${REGPATH_WUPOLICY}" "WUStatusServer" "${WSUS_SERVER}"
WriteRegStr HKLM "${REGPATH_WU}" "URL" "${UPDATE_URL}"
${EndIf}
WriteRegDword HKLM "${REGPATH_WUAUPOLICY}" "UseWUServer" 1
; Restart service
!insertmacro RestartWUAUService
${MementoSectionEnd}
${MementoSection} "Allow OS Upgrade" ALLOWOSUPGRADE
WriteRegDword HKLM "${REGPATH_WUPOLICY}\OSUpgrade" "AllowOSUpgrade" 1
!insertmacro RestartWUAUService
${MementoSectionEnd}
${MementoSectionDone}
Section -Uninstall
SetOutPath $InstallDir
; Delete shortcut
${UnpinShortcut} "$COMMONSTARTMENU\${NAME}.lnk"
Delete "$COMMONSTARTMENU\${NAME}.lnk"
; Delete Control Panel entry
DeleteRegKey HKLM "${REGPATH_CPLNAMESPACE}"
DeleteRegKey HKCR "${REGPATH_CPLCLSID}"
; Restore shortcuts
${If} ${FileExists} "$OUTDIR\Backup\Windows Update.lnk"
Rename "$OUTDIR\Backup\Windows Update.lnk" "$COMMONSTARTMENU\Windows Update.lnk"
${EndIf}
${If} ${FileExists} "$OUTDIR\Backup\Microsoft Update.lnk"
Rename "$OUTDIR\Backup\Microsoft Update.lnk" "$COMMONSTARTMENU\Microsoft Update.lnk"
${EndIf}
; Unregister DLLS
${If} ${IsNativeAMD64}
!insertmacro RegisterDLL Un x64 "$OUTDIR\LegacyUpdate.dll"
!insertmacro RegisterDLL Un x86 "$OUTDIR\LegacyUpdate32.dll"
${Else}
!insertmacro RegisterDLL Un x86 "$OUTDIR\LegacyUpdate.dll"
${EndIf}
; Delete DLLs
SetOverwrite try
!insertmacro TryDelete "$OUTDIR\LegacyUpdate.dll"
!insertmacro TryDelete "$OUTDIR\LegacyUpdate32.dll"
SetOverwrite on
; Clear WSUS server
${If} ${AtMostWinVista}
DeleteRegValue HKLM "${REGPATH_WUPOLICY}" "WUServer"
DeleteRegValue HKLM "${REGPATH_WUPOLICY}" "WUStatusServer"
DeleteRegValue HKLM "${REGPATH_WUAUPOLICY}" "UseWUStatusServer"
DeleteRegValue HKLM "${REGPATH_WU}" "URL"
${EndIf}
; Remove from trusted sites
DeleteRegKey HKCU "${REGPATH_ZONEDOMAINS}\${DOMAIN}"
DeleteRegKey HKCU "${REGPATH_ZONEESCDOMAINS}\${DOMAIN}"
; Restart service
!insertmacro RestartWUAUService
; Delete folders
RMDir /r "$OUTDIR"
RMDir /r /REBOOTOK "$RunOnceDir"
; Delete uninstall entry
DeleteRegKey HKLM "${REGPATH_UNINSTSUBKEY}"
SectionEnd
!define DESCRIPTION_REBOOTS "Your computer will restart automatically to complete installation."
!define DESCRIPTION_SUPEULA "By installing, you are agreeing to the Supplemental End User License Agreement for this update."
!define DESCRIPTION_MSLT "By installing, you are agreeing to the Microsoft Software License Terms for this update."
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${W2KSP4} "Updates Windows 2000 to Service Pack 4, as required to install the Windows Update Agent.$\r$\n${DESCRIPTION_REBOOTS} ${DESCRIPTION_SUPEULA}"
!insertmacro MUI_DESCRIPTION_TEXT ${IE6SP1} "Updates Internet Explorer to 6.0 SP1, as required for Legacy Update.$\r$\n${DESCRIPTION_REBOOTS} ${DESCRIPTION_SUPEULA}"
!insertmacro MUI_DESCRIPTION_TEXT ${XPSP3} "Updates Windows XP to Service Pack 3. Required if you would like to activate Windows online. ${DESCRIPTION_REBOOTS} ${DESCRIPTION_SUPEULA}"
!insertmacro MUI_DESCRIPTION_TEXT ${XPESP3} "Updates Windows XP Embedded to Service Pack 3. Required if you would like to activate Windows online. ${DESCRIPTION_REBOOTS} ${DESCRIPTION_SUPEULA}"
!insertmacro MUI_DESCRIPTION_TEXT ${WES09} "Configures Windows to appear as Windows Embedded POSReady 2009 to Windows Update, enabling access to Windows XP security updates released between 2014 and 2019. Please note that Microsoft officially advises against doing this."
!insertmacro MUI_DESCRIPTION_TEXT ${2003SP2} "Updates Windows XP x64 Edition or Windows Server 2003 to Service Pack 2. Required if you would like to activate Windows online. ${DESCRIPTION_REBOOTS} ${DESCRIPTION_SUPEULA}"
!insertmacro MUI_DESCRIPTION_TEXT ${VISTASP2} "Updates Windows Vista or Windows Server 2008 to Service Pack 2, as required to install the Windows Update Agent. ${DESCRIPTION_REBOOTS} ${DESCRIPTION_MSLT}"
!insertmacro MUI_DESCRIPTION_TEXT ${VISTASSU} "Updates Windows Vista or Windows Server 2008 with additional updates required to resolve issues with the Windows Update Agent.$\r$\n${DESCRIPTION_REBOOTS}"
!insertmacro MUI_DESCRIPTION_TEXT ${VISTAIE9} "Updates Internet Explorer to 9.0.$\r$\n${DESCRIPTION_REBOOTS} ${DESCRIPTION_MSLT}"
!insertmacro MUI_DESCRIPTION_TEXT ${WIN7SP1} "Updates Windows 7 or Windows Server 2008 R2 to Service Pack 1, as required to install the Windows Update Agent. ${DESCRIPTION_REBOOTS} ${DESCRIPTION_MSLT}"
!insertmacro MUI_DESCRIPTION_TEXT ${WIN7SSU} "Updates Windows 7 or Windows Server 2008 R2 with additional updates required to resolve issues with the Windows Update Agent.$\r$\n${DESCRIPTION_REBOOTS}"
!insertmacro MUI_DESCRIPTION_TEXT ${WIN8SSU} "Updates Windows 8 or Windows Server 2012 with additional updates required to resolve issues with the Windows Update Agent.$\r$\n${DESCRIPTION_REBOOTS}"
!insertmacro MUI_DESCRIPTION_TEXT ${WIN81UPGRADE} "Windows 8 can be updated to Windows 8.1. This process involves a manual download. After Legacy Update setup completes, a Microsoft website will be opened with more information."
!insertmacro MUI_DESCRIPTION_TEXT ${WIN81UPDATE1} "Updates Windows 8.1 to Update 1, as required to resolve issues with the Windows Update Agent. Also required to upgrade to Windows 10.$\r$\n${DESCRIPTION_REBOOTS}"
!insertmacro MUI_DESCRIPTION_TEXT ${WIN81SSU} "Updates Windows 8.1 or Windows Server 2012 R2 with additional updates required to resolve issues with the Windows Update Agent.$\r$\n${DESCRIPTION_REBOOTS}"
!insertmacro MUI_DESCRIPTION_TEXT ${WHS2011U4} "Updates Windows Home Server 2011 to Update Rollup 4 to resolve issues with the Windows Update Agent. Also fixes data corruption problems.$\r$\n${DESCRIPTION_REBOOTS}"
!insertmacro MUI_DESCRIPTION_TEXT ${WUA} "Updates the Windows Update Agent to the latest version, as required for Legacy Update."
!insertmacro MUI_DESCRIPTION_TEXT ${ROOTCERTS} "Updates the root certificate store to the latest from Microsoft, and enables additional modern security features. Root certificates are used to verify the security of encrypted (https) connections. This fixes connection issues with some websites."
!insertmacro MUI_DESCRIPTION_TEXT ${WIN7MU} "Configures Windows to install updates for Microsoft Office and other Microsoft software."
!insertmacro MUI_DESCRIPTION_TEXT ${ACTIVATE} "Your copy of Windows is not activated. If you update the root certificates store, Windows Product Activation can be completed over the internet. Legacy Update can start the activation wizard after installation so you can activate your copy of Windows."
!insertmacro MUI_DESCRIPTION_TEXT ${ALLOWOSUPGRADE} "Forces Windows Update to deliver the Windows 10/11 upgrade."
!insertmacro MUI_DESCRIPTION_TEXT ${7ZIP} "Installs 7-Zip on Windows 2000 to open zip files.$\r$\n${DESCRIPTION_SUPEULA}"
!insertmacro MUI_FUNCTION_DESCRIPTION_END
Function OnMouseOverSection
${If} $0 == ${LEGACYUPDATE}
${If} ${AtMostWinXP2003}
StrCpy $0 "Installs WUIsBack, enabling access to the full Windows Update interface via the legacyupdate.net website. Windows Update will be configured to use the WUIsBack WSUS server."
${ElseIf} ${AtMostWin8.1}
StrCpy $0 "Installs WUIsBack, enabling access to the full Windows Update interface via the legacyupdate.net website, and Windows Update Control Panel. Windows Update will be configured to use the WUIsBack WSUS server."
${Else}
StrCpy $0 "Installs WUIsBack, enabling access to the full Windows Update interface via the legacyupdate.net website, and Windows Update Settings page. Windows Update will be configured to use the WUIsBack WSUS server."
${EndIf}
SendMessage $mui.ComponentsPage.DescriptionText ${WM_SETTEXT} 0 "STR:"
EnableWindow $mui.ComponentsPage.DescriptionText 1
SendMessage $mui.ComponentsPage.DescriptionText ${WM_SETTEXT} 0 "STR:$0"
${EndIf}
FunctionEnd
!macro Init
SetShellVarContext All
${If} ${RunningX64}
SetRegView 64
StrCpy $InstallDir "$PROGRAMFILES64\${NAME}"
${Else}
StrCpy $InstallDir "$PROGRAMFILES32\${NAME}"
${EndIf}
StrCpy $RunOnceDir "$COMMONPROGRAMDATA\Legacy Update"
!insertmacro EnsureAdminRights
SetDetailsPrint listonly
!macroend
Function .onInit
${If} ${IsHelp}
MessageBox MB_USERICON \
"Usage: setup.exe [/S] [/norestart]$\r$\n\
$\r$\n\
/S$\tExecutes WUIsBack setup silently.$\r$\n\
/norestart$\tDisables automatic restart during installation.$\r$\n\
$\r$\n\
If no flags are passed, WUIsBack will launch its full user interface.$\r$\n\
For more information on these flags, visit legacyupdate.net."
Quit
${EndIf}
!insertmacro Init
${If} ${IsRunOnce}
${OrIf} ${IsPostInstall}
Call OnRunOnceLogon
${EndIf}
SetOutPath $PLUGINSDIR
File Patches.ini
SetOutPath $RunOnceDir
${MementoSectionRestore}
${If} ${IsWin2000}
!insertmacro RemoveSection ${ALLOWOSUPGRADE}
; Determine whether Win2k prereqs need to be installed
Call NeedsW2KSP4
Call NeedsKB835732
Pop $0
Pop $1
${If} $0 == 0
${AndIf} $1 == 0
!insertmacro RemoveSection ${W2KSP4}
${EndIf}
; Check if system needs Internet Explorer 6
Call NeedsIE6
Pop $0
${If} $0 == 0
!insertmacro RemoveSection ${IE6SP1}
${EndIf}
; Check if 7-Zip is installed
${If} ${FileExists} "$PROGRAMFILES\7-Zip\7zFM.exe"
!insertmacro RemoveSection ${7ZIP}
${EndIf}
${Else}
!insertmacro RemoveSection ${W2KSP4}
!insertmacro RemoveSection ${IE6SP1}
!insertmacro RemoveSection ${7ZIP}
${EndIf}
${If} ${IsWinXP2002}
!insertmacro RemoveSection ${ALLOWOSUPGRADE}
${If} ${IsEmbedded}
; Determine whether XP Embedded prereqs need to be installed
; Windows XP Embedded (version 2001), including FLP and WEPOS, has a different service pack
!insertmacro RemoveSection ${XPSP3}
Call NeedsXPESP3
Pop $0
${If} $0 == 0
!insertmacro RemoveSection ${XPESP3}
${EndIf}
${EndIf}
${IfNot} ${IsEmbedded}
; Determine whether XP prereqs need to be installed
!insertmacro RemoveSection ${XPESP3}
Call NeedsXPSP3
Pop $0
${If} $0 == 0
!insertmacro RemoveSection ${XPSP3}
${EndIf}
${EndIf}
ReadRegDword $0 HKLM "${REGPATH_POSREADY}" "Installed"
${If} $0 == 1
!insertmacro RemoveSection ${WES09}
${EndIf}
${Else}
!insertmacro RemoveSection ${XPSP3}
!insertmacro RemoveSection ${XPESP3}
!insertmacro RemoveSection ${WES09}
${EndIf}
${If} ${IsWinXP2003}
!insertmacro RemoveSection ${ALLOWOSUPGRADE}
; Determine whether 2003 prereqs need to be installed
Call Needs2003SP2
Pop $0
${If} $0 == 0
!insertmacro RemoveSection ${2003SP2}
${EndIf}
${Else}
!insertmacro RemoveSection ${2003SP2}
${EndIf}
${If} ${IsWinVista}
!insertmacro RemoveSection ${ALLOWOSUPGRADE}
; Determine whether Vista prereqs need to be installed
Call NeedsVistaSP2
Pop $0
${If} $0 == 0
!insertmacro RemoveSection ${VISTASP2}
${EndIf}
Call NeedsVistaPostSP2
Pop $0
${If} $0 == 0
!insertmacro RemoveSection ${VISTASSU}
${EndIf}
Call NeedsIE9
Pop $0
${If} $0 == 0
!insertmacro RemoveSection ${VISTAIE9}
${EndIf}
${Else}
!insertmacro RemoveSection ${VISTASP2}
!insertmacro RemoveSection ${VISTASSU}
!insertmacro RemoveSection ${VISTAIE9}
${EndIf}
${If} ${IsWin7}
; Determine whether 7 prereqs need to be installed
Call NeedsWin7SP1
Pop $0
${If} $0 == 0
!insertmacro RemoveSection ${WIN7SP1}
${EndIf}
${If} ${IsHomeServer}
Call NeedsKB2757011
Pop $0
${If} $0 == 0
!insertmacro RemoveSection ${WHS2011U4}
${EndIf}
${Else}
!insertmacro RemoveSection ${WHS2011U4}
${EndIf}
Call NeedsWin7SHA2
Pop $0
${If} $0 == 0
!insertmacro RemoveSection ${WIN7SSU}
${EndIf}
ClearErrors
EnumRegKey $0 HKLM "${REGPATH_WU_SERVICES}\${WU_MU_SERVICE_ID}" 0
${IfNot} ${Errors}
!insertmacro RemoveSection ${WIN7MU}
${EndIf}
${Else}
!insertmacro RemoveSection ${WIN7SP1}
!insertmacro RemoveSection ${WHS2011U4}
!insertmacro RemoveSection ${WIN7SSU}
!insertmacro RemoveSection ${WIN7MU}
${EndIf}
${If} ${IsWin8}
; Determine whether 8 prereqs need to be installed
${IfNot} ${IsWin8}
!insertmacro RemoveSection ${WIN81UPGRADE}
${EndIf}
Call NeedsKB4598297
Pop $0
${If} $0 == 0
!insertmacro RemoveSection ${WIN8SSU}
${EndIf}
${Else}
!insertmacro RemoveSection ${WIN81UPGRADE}
!insertmacro RemoveSection ${WIN8SSU}
${EndIf}
${If} ${IsWin8.1}
; Determine whether 8.1 prereqs need to be installed
Call NeedsWin81Update1
Pop $0
${If} $0 == 0
!insertmacro RemoveSection ${WIN81UPDATE1}
${EndIf}
Call NeedsKB3021910
Pop $0
${If} $0 == 0
!insertmacro RemoveSection ${WIN81SSU}
${EndIf}
${Else}
!insertmacro RemoveSection ${WIN81UPDATE1}
!insertmacro RemoveSection ${WIN81SSU}
${EndIf}
Call DetermineWUAVersion
${If} $0 == ""
!insertmacro RemoveSection ${WUA}
${EndIf}
${If} ${IsWinXP2002}
${OrIf} ${IsWinXP2003}
; Check if the OS needs activation
LegacyUpdateNSIS::IsProcessRunning "wpabaln.exe"
Pop $0
${If} $0 == 0
!insertmacro RemoveSection ${ACTIVATE}
${EndIf}
${Else}
!insertmacro RemoveSection ${ACTIVATE}
${EndIf}
; Try not to be too intrusive on Windows 10 and newer, which are (for now) fine
${If} ${AtLeastWin10}
!insertmacro RemoveSection ${ALLOWOSUPGRADE}
!insertmacro RemoveSection ${ROOTCERTS}
${EndIf}
FunctionEnd
Function ComponentsPageCheck
; Skip the page if we're being launched via RunOnce
${If} ${IsRunOnce}
${OrIf} ${IsPostInstall}
Abort
${EndIf}
; Skip if installer was invoked by IE, and all prerequisites are installed
${If} ${IsActiveXInstall}
${AndIf} ${SectionIsSelected} ${LEGACYUPDATE}
StrCpy $1 0
${For} $0 ${PREREQS_START} ${PREREQS_END}
${If} ${SectionIsSelected} $0
${AndIf} $0 != ${PREREQS_START}
${AndIf} $0 != ${PREREQS_END}
${AndIf} $0 != ${LEGACYUPDATE}
${AndIf} $0 != ${ROOTCERTS}
StrCpy $1 1
${Break}
${EndIf}
${Next}
${If} $1 == 0
Abort
${EndIf}
${EndIf}
FunctionEnd
Function PreDownload
; Win2k
${If} ${IsWin2000}
Call DownloadW2KSP4
Call DownloadKB835732
Call DownloadIE6
${EndIf}
; XP 2002
${If} ${IsWinXP2002}
${AndIf} ${SectionIsSelected} ${XPSP3}
Call DownloadXPSP2
Call DownloadXPSP3
${EndIf}
${If} ${IsWinXP2002}
${AndIf} ${SectionIsSelected} ${XPESP3}
Call DownloadXPESP3
${EndIf}
; XP 2003
${If} ${IsWinXP2003}
${AndIf} ${SectionIsSelected} ${2003SP2}
Call Download2003SP2
${EndIf}
; Vista
${If} ${IsWinVista}
Call DownloadVistaSP1
Call DownloadVistaSP2
Call DownloadKB3205638
Call DownloadKB4012583
Call DownloadKB4015195
Call DownloadKB4015380
Call DownloadKB4493730
${If} ${SectionIsSelected} ${VISTAIE9}
Call DownloadKB971512
Call DownloadKB2117917
Call DownloadIE9
${EndIf}
${EndIf}
; 7
${If} ${IsWin7}
${If} ${IsHomeServer}
Call DownloadKB2757011
${Else}
Call DownloadWin7SP1
${EndIf}
Call DownloadKB3138612
Call DownloadKB4474419
Call DownloadKB4490628
${EndIf}
; 8
${If} ${IsWin8}
Call DownloadKB4598297
${EndIf}
; 8.1
${If} ${IsWin8.1}
Call DownloadKB3021910
Call DownloadClearCompressionFlag
Call DownloadKB2919355
Call DownloadKB2932046
Call DownloadKB2959977
Call DownloadKB2937592
Call DownloadKB2934018
Call DownloadKB3021910
${EndIf}
; General
Call DownloadWUA
${If} ${AtMostWin8.1}
${AndIf} ${SectionIsSelected} ${ROOTCERTS}
Call DownloadRoots
${EndIf}
FunctionEnd
Function PostInstall
; Handle first run flag if needed
${If} ${FileExists} "$InstallDir\LegacyUpdate.dll"
ReadRegDword $0 HKLM "${REGPATH_LEGACYUPDATE_SETUP}" "ActiveXInstalled"
${If} ${Errors}
StrCpy $0 "firstrun"
${Else}
StrCpy $0 ""
${EndIf}
WriteRegDword HKLM "${REGPATH_LEGACYUPDATE_SETUP}" "ActiveXInstalled" 1
${EndIf}
${IfNot} ${Silent}
${AndIfNot} ${IsRunOnce}
${IfNot} ${IsActiveXInstall}
${AndIf} ${SectionIsSelected} ${LEGACYUPDATE}
Exec '$SYSDIR\rundll32.exe "$InstallDir\LegacyUpdate.dll",LaunchUpdateSite $0'
${ElseIf} ${AtLeastWinVista}
Exec '$SYSDIR\wuauclt.exe /ShowWUAutoScan'
${EndIf}
; Launch XP activation wizard if requested by the user
${If} ${SectionIsSelected} ${ACTIVATE}
ExecShell "" "$WINDIR\system32\oobe\msoobe.exe" "/a"
${EndIf}
; Launch Windows 8.1 upgrade site if requested by the user
${If} ${SectionIsSelected} ${WIN81UPGRADE}
ExecShell "" "${WIN81UPGRADE_URL}"
${EndIf}
${EndIf}
FunctionEnd
Function CleanUp
Call CleanUpRunOnce
!insertmacro InhibitSleep 0
${If} ${IsPostInstall}
${OrIfNot} ${RebootFlag}
RMDir /r /REBOOTOK "$RunOnceDir"
${EndIf}
FunctionEnd
Function .onInstSuccess
${MementoSectionSave}
; Reboot now if we need to. Nothing further in this function will be run if we do need to reboot.
Call RebootIfRequired
; If we're done, launch the update site
Call PostInstall
Call CleanUp
FunctionEnd
Function .onInstFailed
Call CleanUp
FunctionEnd
Function .onSelChange
${If} ${SectionIsSelected} ${WES09}
; Check for SSE2.
System::Call 'kernel32::IsProcessorFeaturePresent(i ${PF_XMMI64_INSTRUCTIONS_AVAILABLE}) i .r0'
${If} $0 == 0
MessageBox MB_USERICON "Your processor does not support the Streaming SIMD Extensions 2 (SSE2) instruction set, which is required to install Windows Embedded 2009 updates released after May 2018. Processors that initially implemented SSE2 instructions include the Intel Pentium 4, Pentium M, and AMD Athlon 64.$\r$\n$\r$\nTo protect your Windows installation from becoming corrupted by incompatible updates, this option will be disabled." /SD IDOK
!insertmacro UnselectSection ${WES09}
${EndIf}
${EndIf}
FunctionEnd
Function un.onInit
!insertmacro Init
FunctionEnd
Function un.onUninstSuccess
!insertmacro DetailPrint "Done"
Call un.RebootIfRequired
${IfNot} ${RebootFlag}
Quit
${EndIf}
FunctionEnd

BIN
setup/setupbanner.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

BIN
setup/updroots.exe Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.