Restore Windows Update for Windows XP / Server 2003

Discussion in 'Windows XP / Older OS' started by daniel_k, Oct 21, 2020.

  1. Windows7fan

    Windows7fan MDL Junior Member

    Sep 20, 2020
    80
    61
    0
  2. jiafei2427

    jiafei2427 MDL Member

    Nov 26, 2020
    207
    55
    10
    Is there support for other languages?
     
  3. Windows7fan

    Windows7fan MDL Junior Member

    Sep 20, 2020
    80
    61
    0
    That feature is being worked on and will come soon. But for now, it is only English. I just need to download the updates from the catalog and implement a feature in the script that detects your language.
     
  4. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,454
    60
    Code:
    REM 5.x Language
    for /f "tokens=3 delims= " %%i in ('REG QUERY HKLM\SYSTEM\ControlSet001\Control\Nls\Language /v "InstallLanguage"') do (
        if /i "%%i" == "0401" set "SLLP=ar-SA"
        if /i "%%i" == "0404" set "SLLP=zh-TW"
        if /i "%%i" == "0405" set "SLLP=cs-CZ"
        if /i "%%i" == "0406" set "SLLP=da-DK"
        if /i "%%i" == "0407" set "SLLP=de-DE"
        if /i "%%i" == "0408" set "SLLP=el-GR"
        if /i "%%i" == "0409" set "SLLP=en-US"
        if /i "%%i" == "040B" set "SLLP=fi-FI"
        if /i "%%i" == "040C" set "SLLP=fr-FR"
        if /i "%%i" == "040d" set "SLLP=he-IL"
        if /i "%%i" == "040D" set "SLLP=he-IL"
        if /i "%%i" == "040E" set "SLLP=hu-HU"
        if /i "%%i" == "0410" set "SLLP=it-IT"
        if /i "%%i" == "0411" set "SLLP=ja-JP"
        if /i "%%i" == "0412" set "SLLP=ko-KR"
        if /i "%%i" == "0413" set "SLLP=nl-NL"
        if /i "%%i" == "0414" set "SLLP=nb-NO"
        if /i "%%i" == "0415" set "SLLP=pl-PL"
        if /i "%%i" == "0416" set "SLLP=pt-BR"
        if /i "%%i" == "0419" set "SLLP=ru-RU"
        if /i "%%i" == "041D" set "SLLP=sv-SE"
        if /i "%%i" == "041F" set "SLLP=tr-TR"
        if /i "%%i" == "0804" set "SLLP=zh-CN"
        if /i "%%i" == "0816" set "SLLP=pt-PT"
        if /i "%%i" == "0C0A" set "SLLP=es-ES"
    )
    
    P.S. Try to get rid of WMIC as it's not present on Home editions.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    4,161
    5,975
    150
    #245 Dark Dinosaur, Feb 26, 2022
    Last edited: Feb 27, 2022
    ^^_^^
    No WMIC [v2.0]
    Make sure QueryTool in same directory

    Code:
    @cls
    @ECHO OFF
    setLocal EnableExtensions EnableDelayedExpansion
    
    set "CFF=cscript QueryTool.vbs /QUERY_BASIC BuildNumber Win32_OperatingSystem"
    for /f "tokens=1 skip=3 delims=," %%g in ('!CFF!') do set "OSBuildNumber=%%g"
    IF %OSBuildNumber%==2600 set OSArchitecture=x86
    IF %OSBuildNumber%==2600 goto COMMON
    
    set "CFF=cscript QueryTool.vbs /QUERY_BASIC OSLanguage Win32_OperatingSystem"
    for /f "tokens=2 skip=3 delims=," %%g in ('!CFF!') do set "OSLanguage=%%g"
    
    IF %OSLanguage%==2052 set OSLanguageID=CHS
    IF %OSLanguage%==1028 set OSLanguageID=CHT
    IF %OSLanguage%==1029 set OSLanguageID=CSY
    IF %OSLanguage%==1031 set OSLanguageID=DEU
    IF %OSLanguage%==1033 set OSLanguageID=ENU
    IF %OSLanguage%==3082 set OSLanguageID=ESN
    IF %OSLanguage%==1036 set OSLanguageID=FRA
    IF %OSLanguage%==1038 set OSLanguageID=HUN
    IF %OSLanguage%==1040 set OSLanguageID=ITA
    IF %OSLanguage%==1041 set OSLanguageID=JPN
    IF %OSLanguage%==1042 set OSLanguageID=KOR
    IF %OSLanguage%==1043 set OSLanguageID=NLD
    IF %OSLanguage%==1045 set OSLanguageID=PLK
    IF %OSLanguage%==1046 set OSLanguageID=PTB
    IF %OSLanguage%==2070 set OSLanguageID=PTG
    IF %OSLanguage%==1049 set OSLanguageID=RUS
    IF %OSLanguage%==1053 set OSLanguageID=SVE
    IF %OSLanguage%==1055 set OSLanguageID=TRK
    
    set "CFF=cscript QueryTool.vbs /QUERY_BASIC AddressWidth Win32_Processor"
    for /f "tokens=1 skip=3 delims=," %%g in ('!CFF!') do set "OSArchitecture=%%g"
    
    IF %OSArchitecture%==32 set OSArchitecture=x86
    IF %OSArchitecture%==64 set OSArchitecture=x64
    
     

    Attached Files:

    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Windows7fan

    Windows7fan MDL Junior Member

    Sep 20, 2020
    80
    61
    0
    Thanks for the code. This will be the next major update. Although I don't really know any substitutions for seeing the build number and seeing the architecture type. This issue is major, I even have it myself on my 2003 XP home machine.
     
  7. Windows7fan

    Windows7fan MDL Junior Member

    Sep 20, 2020
    80
    61
    0
    Thanks, but it seems your file still has wmic in it which I am aiming at eliminating to extend support to XP home.
     
  8. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,454
    60
    Code:
    REM Set host architecture
    if exist "%WinDir%\SysWOW64" (
        set ARCH=x64
    ) else (
        set ARCH=x86
    )
    
    REM Host version
    for /f "tokens=4,5,6 delims=[]. " %%G in ('ver') do set WinVer=%%H.%%I
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,454
    60
    Btw, when you use OnePiece packs, then you need only patch wuaeng.dll and add needed registry entries
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    4,161
    5,975
    150
    I kill all wmic .. will check again
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,454
    60
    I have looked into patched x86 wuaeng.dll and I think I created same patch for x64. I will do some x86 and x64 tests on images with OnePiece UpdatePacks Packs and 5earph Update pack on x64.

    I think patched wuaeng.dll + test keys + ProxHTTPSProxy / HTTPSProxy will be enough on my images
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. ExtremeGrief

    ExtremeGrief MDL Addicted

    Jun 2, 2020
    729
    156
    30
    Server 2003 / XP x64 don't have TLS 1.2 support
     
  13. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,209
    90,788
    340
    Original Restore_WU_XP_2003.7z contain patched x64 wuaueng.dll
     
  14. George King

    George King MDL Expert

    Aug 5, 2009
    1,961
    2,454
    60
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. daniel_k

    daniel_k MDL Member

    Jan 21, 2019
    196
    446
    10
    #255 daniel_k, Feb 28, 2022
    Last edited: Feb 28, 2022
    (OP)
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. ExtremeGrief

    ExtremeGrief MDL Addicted

    Jun 2, 2020
    729
    156
    30
    This works without any extra updates?
     
  17. AstroSkipper

    AstroSkipper MDL Novice

    Sep 24, 2009
    14
    10
    0
  18. Windows7fan

    Windows7fan MDL Junior Member

    Sep 20, 2020
    80
    61
    0
    Actually it does. It uses the Root Certificate updater from heinoganda over at MSFN, and connects directly to Microsoft Servers to get the latest Root Certificates all across the system. It does NOT update the ProxHTTPSProxy certificates.