From 58776261557dd66514c47446eea3d97bac98cb48 Mon Sep 17 00:00:00 2001 From: Vichingo455 Date: Tue, 4 Nov 2025 17:27:21 +0100 Subject: [PATCH] v2.4 hopefully --- .github/workflows/nightly.yml | 38 - .gitignore | 3 + .idea/.idea.LegacyUpdate/.idea/.gitignore | 13 - .idea/.idea.LegacyUpdate/.idea/discord.xml | 7 - .idea/.idea.LegacyUpdate/.idea/icon.svg | 1 - .../.idea.LegacyUpdate/.idea/indexLayout.xml | 10 - .idea/.idea.LegacyUpdate/.idea/vcs.xml | 6 - .vscode/c_cpp_properties.json | 37 - .vscode/settings.json | 6 - .vsconfig | 8 - LegacyUpdate.sln | 37 - LegacyUpdate/Compat.cpp | 53 - LegacyUpdate/Compat.h | 4 - LegacyUpdate/ElevationHelper.cpp | 84 - LegacyUpdate/ElevationHelper.h | 45 - LegacyUpdate/ElevationHelper.rgs | 31 - LegacyUpdate/IUpdateInstaller4.h | 650 --- LegacyUpdate/LaunchUpdateSite.cpp | 36 - LegacyUpdate/LaunchUpdateSite.h | 3 - LegacyUpdate/LegacyUpdate.def | 14 - LegacyUpdate/LegacyUpdate.idl | 126 - LegacyUpdate/LegacyUpdate.rc | 134 - LegacyUpdate/LegacyUpdate.rgs | 14 - LegacyUpdate/LegacyUpdate.vcxproj | 601 --- LegacyUpdate/LegacyUpdate.vcxproj.filters | 168 - LegacyUpdate/LegacyUpdateCtrl.cpp | 521 --- LegacyUpdate/LegacyUpdateCtrl.h | 119 - LegacyUpdate/LegacyUpdateCtrl.rgs | 37 - LegacyUpdate/Makefile | 43 - LegacyUpdate/ProgressBarControl.cpp | 65 - LegacyUpdate/ProgressBarControl.h | 77 - LegacyUpdate/ProgressBarControl.html | 48 - LegacyUpdate/ProgressBarControl.rgs | 34 - LegacyUpdate/Resource.h | 20 - LegacyUpdate/Utils.cpp | 167 - LegacyUpdate/Utils.h | 5 - LegacyUpdate/build.cmd | 17 - LegacyUpdate/dlldata.c | 38 - LegacyUpdate/dlldatax.c | 18 - LegacyUpdate/dlldatax.h | 11 - LegacyUpdate/dllmain.cpp | 144 - LegacyUpdate/dllmain.h | 10 - LegacyUpdate/stdafx.cpp | 5 - LegacyUpdate/stdafx.h | 28 - LegacyUpdate/targetver.h | 11 - LegacyUpdate/wuapi.idl | 39 - LegacyUpdate/wuerror.mc | 3943 ----------------- Makefile | 19 - build.cmd | 3 - build/fix-nsis.sh | 35 - build/fix-vc08-aslr.reg | Bin 1408 -> 0 bytes build/getvc.cmd | 23 - build/sign.cmd | 10 - build/sign.sh | 9 - nsisplugin/CloseIEWindows.c | 64 - nsisplugin/DialogInit.c | 377 -- nsisplugin/EnableMicrosoftUpdate.c | 35 - nsisplugin/Exec.c | 602 --- nsisplugin/IsActivated.c | 122 - nsisplugin/IsAdmin.c | 9 - nsisplugin/Makefile | 118 - nsisplugin/MessageForHresult.c | 17 - nsisplugin/TaskbarProgress.c | 144 - nsisplugin/UpdateRoots.c | 67 - nsisplugin/main.c | 22 - nsisplugin/main.h | 4 - nsisplugin/resource.h | 0 nsisplugin/resource.rc | 54 - nsisplugin/stdafx.h | 36 - setup/Common.nsh | 5 - setup/Makefile | 32 - setup/cert.reg | Bin 0 -> 7466 bytes setup/setup.nsi | 7 +- sign.cmd | 51 +- 74 files changed, 48 insertions(+), 9346 deletions(-) delete mode 100644 .github/workflows/nightly.yml delete mode 100644 .idea/.idea.LegacyUpdate/.idea/.gitignore delete mode 100644 .idea/.idea.LegacyUpdate/.idea/discord.xml delete mode 100644 .idea/.idea.LegacyUpdate/.idea/icon.svg delete mode 100644 .idea/.idea.LegacyUpdate/.idea/indexLayout.xml delete mode 100644 .idea/.idea.LegacyUpdate/.idea/vcs.xml delete mode 100644 .vscode/c_cpp_properties.json delete mode 100644 .vscode/settings.json delete mode 100644 .vsconfig delete mode 100644 LegacyUpdate.sln delete mode 100644 LegacyUpdate/Compat.cpp delete mode 100644 LegacyUpdate/Compat.h delete mode 100644 LegacyUpdate/ElevationHelper.cpp delete mode 100644 LegacyUpdate/ElevationHelper.h delete mode 100644 LegacyUpdate/ElevationHelper.rgs delete mode 100644 LegacyUpdate/IUpdateInstaller4.h delete mode 100644 LegacyUpdate/LaunchUpdateSite.cpp delete mode 100644 LegacyUpdate/LaunchUpdateSite.h delete mode 100644 LegacyUpdate/LegacyUpdate.def delete mode 100644 LegacyUpdate/LegacyUpdate.idl delete mode 100644 LegacyUpdate/LegacyUpdate.rc delete mode 100644 LegacyUpdate/LegacyUpdate.rgs delete mode 100644 LegacyUpdate/LegacyUpdate.vcxproj delete mode 100644 LegacyUpdate/LegacyUpdate.vcxproj.filters delete mode 100644 LegacyUpdate/LegacyUpdateCtrl.cpp delete mode 100644 LegacyUpdate/LegacyUpdateCtrl.h delete mode 100644 LegacyUpdate/LegacyUpdateCtrl.rgs delete mode 100644 LegacyUpdate/Makefile delete mode 100644 LegacyUpdate/ProgressBarControl.cpp delete mode 100644 LegacyUpdate/ProgressBarControl.h delete mode 100644 LegacyUpdate/ProgressBarControl.html delete mode 100644 LegacyUpdate/ProgressBarControl.rgs delete mode 100644 LegacyUpdate/Resource.h delete mode 100644 LegacyUpdate/Utils.cpp delete mode 100644 LegacyUpdate/Utils.h delete mode 100644 LegacyUpdate/build.cmd delete mode 100644 LegacyUpdate/dlldata.c delete mode 100644 LegacyUpdate/dlldatax.c delete mode 100644 LegacyUpdate/dlldatax.h delete mode 100644 LegacyUpdate/dllmain.cpp delete mode 100644 LegacyUpdate/dllmain.h delete mode 100644 LegacyUpdate/stdafx.cpp delete mode 100644 LegacyUpdate/stdafx.h delete mode 100644 LegacyUpdate/targetver.h delete mode 100644 LegacyUpdate/wuapi.idl delete mode 100644 LegacyUpdate/wuerror.mc delete mode 100644 Makefile delete mode 100644 build/fix-nsis.sh delete mode 100644 build/fix-vc08-aslr.reg delete mode 100644 build/getvc.cmd delete mode 100644 build/sign.cmd delete mode 100644 build/sign.sh delete mode 100644 nsisplugin/CloseIEWindows.c delete mode 100644 nsisplugin/DialogInit.c delete mode 100644 nsisplugin/EnableMicrosoftUpdate.c delete mode 100644 nsisplugin/Exec.c delete mode 100644 nsisplugin/IsActivated.c delete mode 100644 nsisplugin/IsAdmin.c delete mode 100644 nsisplugin/Makefile delete mode 100644 nsisplugin/MessageForHresult.c delete mode 100644 nsisplugin/TaskbarProgress.c delete mode 100644 nsisplugin/UpdateRoots.c delete mode 100644 nsisplugin/main.c delete mode 100644 nsisplugin/main.h delete mode 100644 nsisplugin/resource.h delete mode 100644 nsisplugin/resource.rc delete mode 100644 nsisplugin/stdafx.h delete mode 100644 setup/Makefile create mode 100644 setup/cert.reg diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml deleted file mode 100644 index e10405c..0000000 --- a/.github/workflows/nightly.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: WUIsBack Nightly AutoBuilder - -on: - push: - branches: - - master - workflow_dispatch: - -jobs: - build: - runs-on: windows-latest - steps: - - name: Download repository - uses: actions/checkout@v3 - - name: Install NSIS - run: | - iwr -useb get.scoop.sh -outfile 'install.ps1' - .\install.ps1 -RunAsAdmin - scoop update - scoop bucket add extras - scoop install nsis - - name: Download latest DLL - run: | - md .\Release - md .\x64\Release - md .\launcher\obj - iwr https://ftp.vichingo455.freeddns.org/pub/WUIsBack/.github/LegacyUpdate32.dll -outfile '.\Release\LegacyUpdate.dll' - iwr https://ftp.vichingo455.freeddns.org/pub/WUIsBack/.github/LegacyUpdate64.dll -outfile '.\x64\Release\LegacyUpdate.dll' - iwr https://ftp.vichingo455.freeddns.org/pub/WUIsBack/.github/LegacyUpdate32.exe -outfile '.\launcher\obj\LegacyUpdate32.exe' - iwr https://ftp.vichingo455.freeddns.org/pub/WUIsBack/.github/LegacyUpdate64.exe -outfile '.\launcher\obj\LegacyUpdate64.exe' - - name: Compile WUIsBack - run: | - makensis "setup\setup.nsi" - - name: Upload Nightly Build - uses: actions/upload-artifact@v4 - with: - name: WUIsBack-nightly - path: setup/WUIsBack-latest.exe diff --git a/.gitignore b/.gitignore index 5b40a76..67b83c2 100644 --- a/.gitignore +++ b/.gitignore @@ -120,3 +120,6 @@ ServiceFabricBackup/ *.msix *.msm *.msp + +# VS Code +.vscode/ \ No newline at end of file diff --git a/.idea/.idea.LegacyUpdate/.idea/.gitignore b/.idea/.idea.LegacyUpdate/.idea/.gitignore deleted file mode 100644 index 15cc650..0000000 --- a/.idea/.idea.LegacyUpdate/.idea/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Rider ignored files -/.idea.LegacyUpdate.iml -/modules.xml -/contentModel.xml -/projectSettingsUpdater.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.idea/.idea.LegacyUpdate/.idea/discord.xml b/.idea/.idea.LegacyUpdate/.idea/discord.xml deleted file mode 100644 index 8cf359d..0000000 --- a/.idea/.idea.LegacyUpdate/.idea/discord.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - \ No newline at end of file diff --git a/.idea/.idea.LegacyUpdate/.idea/icon.svg b/.idea/.idea.LegacyUpdate/.idea/icon.svg deleted file mode 100644 index bdea646..0000000 --- a/.idea/.idea.LegacyUpdate/.idea/icon.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/.idea/.idea.LegacyUpdate/.idea/indexLayout.xml b/.idea/.idea.LegacyUpdate/.idea/indexLayout.xml deleted file mode 100644 index 323a9b7..0000000 --- a/.idea/.idea.LegacyUpdate/.idea/indexLayout.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - . - - - - - \ No newline at end of file diff --git a/.idea/.idea.LegacyUpdate/.idea/vcs.xml b/.idea/.idea.LegacyUpdate/.idea/vcs.xml deleted file mode 100644 index 35eb1dd..0000000 --- a/.idea/.idea.LegacyUpdate/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json deleted file mode 100644 index 21c0cef..0000000 --- a/.vscode/c_cpp_properties.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "configurations": [ - { - "name": "MinGW", - "includePath": [ - "${workspaceFolder}/include", - "${workspaceFolder}/shared" - ], - "compilerPath": "/usr/bin/i686-w64-mingw32-g++", - "cStandard": "c17", - "cppStandard": "c++11", - "intelliSenseMode": "windows-gcc-x86", - "compilerArgs": [ - "-std=c++11", - "-mwindows", - "-municode", - "-s", - "-fPIE", - "-ffunction-sections", - "-fdata-sections", - "-fno-unwind-tables", - "-fno-asynchronous-unwind-tables", - "-fno-exceptions", - "-fno-rtti", - "-flto", - "-Wno-write-strings", - "-include stdafx.h" - ], - "defines": [ - "UNICODE", - "_UNICODE", - "_USRDLL" - ] - } - ], - "version": 4 -} diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index a3c3d84..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "files.associations": { - "*.rc": "cpp", - "*.idl": "cpp" - } -} diff --git a/.vsconfig b/.vsconfig deleted file mode 100644 index 31366d6..0000000 --- a/.vsconfig +++ /dev/null @@ -1,8 +0,0 @@ -{ - "version": "1.0", - "components": [ - "Microsoft.VisualStudio.Component.VC.v141.x86.x64", - "Microsoft.VisualStudio.Component.WinXP", - "Microsoft.VisualStudio.Component.VC.v141.ATL" - ] -} diff --git a/LegacyUpdate.sln b/LegacyUpdate.sln deleted file mode 100644 index 7b5cdbf..0000000 --- a/LegacyUpdate.sln +++ /dev/null @@ -1,37 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.3.32929.385 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LegacyUpdate", "LegacyUpdate\LegacyUpdate.vcxproj", "{95F3E1A1-5DDA-4C4D-B52B-981D46E6C98B}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug-VC08|Win32 = Debug-VC08|Win32 - Debug-VC08|x64 = Debug-VC08|x64 - Debug-VC17|Win32 = Debug-VC17|Win32 - Debug-VC17|x64 = Debug-VC17|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {95F3E1A1-5DDA-4C4D-B52B-981D46E6C98B}.Debug-VC08|Win32.ActiveCfg = Debug-VC08|Win32 - {95F3E1A1-5DDA-4C4D-B52B-981D46E6C98B}.Debug-VC08|Win32.Build.0 = Debug-VC08|Win32 - {95F3E1A1-5DDA-4C4D-B52B-981D46E6C98B}.Debug-VC08|x64.ActiveCfg = Debug-VC17|x64 - {95F3E1A1-5DDA-4C4D-B52B-981D46E6C98B}.Debug-VC08|x64.Build.0 = Debug-VC17|x64 - {95F3E1A1-5DDA-4C4D-B52B-981D46E6C98B}.Debug-VC17|Win32.ActiveCfg = Debug-VC17|Win32 - {95F3E1A1-5DDA-4C4D-B52B-981D46E6C98B}.Debug-VC17|Win32.Build.0 = Debug-VC17|Win32 - {95F3E1A1-5DDA-4C4D-B52B-981D46E6C98B}.Debug-VC17|x64.ActiveCfg = Debug-VC17|x64 - {95F3E1A1-5DDA-4C4D-B52B-981D46E6C98B}.Debug-VC17|x64.Build.0 = Debug-VC17|x64 - {95F3E1A1-5DDA-4C4D-B52B-981D46E6C98B}.Release|Win32.ActiveCfg = Release|Win32 - {95F3E1A1-5DDA-4C4D-B52B-981D46E6C98B}.Release|Win32.Build.0 = Release|Win32 - {95F3E1A1-5DDA-4C4D-B52B-981D46E6C98B}.Release|x64.ActiveCfg = Release|x64 - {95F3E1A1-5DDA-4C4D-B52B-981D46E6C98B}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {E11EF986-8512-4F69-B67C-C40CCB81052A} - EndGlobalSection -EndGlobal diff --git a/LegacyUpdate/Compat.cpp b/LegacyUpdate/Compat.cpp deleted file mode 100644 index 1ef7004..0000000 --- a/LegacyUpdate/Compat.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include "stdafx.h" -#include -#include "Utils.h" - -#ifndef PROCESS_PER_MONITOR_DPI_AWARE -typedef int PROCESS_DPI_AWARENESS; -#define PROCESS_PER_MONITOR_DPI_AWARE 2 -#endif - -#ifndef DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 -typedef int DPI_AWARENESS_CONTEXT; -#define DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 ((DPI_AWARENESS_CONTEXT)-4) -#endif - -typedef BOOL (WINAPI *_GetProductInfo)(DWORD, DWORD, DWORD, DWORD, PDWORD); - -typedef BOOL (WINAPI *_SetProcessDpiAwarenessContext)(DPI_AWARENESS_CONTEXT); -typedef HRESULT (WINAPI *_SetProcessDpiAwareness)(PROCESS_DPI_AWARENESS); -typedef void (WINAPI *_SetProcessDPIAware)(); - -_GetProductInfo $GetProductInfo = (_GetProductInfo)GetProcAddress(GetModuleHandle(L"kernel32.dll"), "GetProductInfo"); - -BOOL GetVistaProductInfo(DWORD dwOSMajorVersion, DWORD dwOSMinorVersion, DWORD dwSpMajorVersion, DWORD dwSpMinorVersion, PDWORD pdwReturnedProductType) { - if ($GetProductInfo) { - return $GetProductInfo(dwOSMajorVersion, dwOSMinorVersion, dwSpMajorVersion, dwSpMinorVersion, pdwReturnedProductType); - } else { - *pdwReturnedProductType = PRODUCT_UNDEFINED; - return FALSE; - } -} - -void BecomeDPIAware() { - // Make the process DPI-aware... hopefully - // Windows 10 1703+ per-monitor v2 - _SetProcessDpiAwarenessContext $SetProcessDpiAwarenessContext = (_SetProcessDpiAwarenessContext)GetProcAddress(LoadLibrary(L"user32.dll"), "SetProcessDpiAwarenessContext"); - if ($SetProcessDpiAwarenessContext) { - $SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2); - return; - } - - // Windows 8.1 - 10 1607 per-monitor v1 - _SetProcessDpiAwareness $SetProcessDpiAwareness = (_SetProcessDpiAwareness)GetProcAddress(LoadLibrary(L"shcore.dll"), "SetProcessDpiAwareness"); - if ($SetProcessDpiAwareness) { - $SetProcessDpiAwareness(PROCESS_PER_MONITOR_DPI_AWARE); - return; - } - - // Windows Vista - 8 - _SetProcessDPIAware $SetProcessDPIAware = (_SetProcessDPIAware)GetProcAddress(LoadLibrary(L"user32.dll"), "SetProcessDPIAware"); - if ($SetProcessDPIAware) { - $SetProcessDPIAware(); - } -} diff --git a/LegacyUpdate/Compat.h b/LegacyUpdate/Compat.h deleted file mode 100644 index 88750f7..0000000 --- a/LegacyUpdate/Compat.h +++ /dev/null @@ -1,4 +0,0 @@ -#pragma once - -BOOL GetVistaProductInfo(DWORD dwOSMajorVersion, DWORD dwOSMinorVersion, DWORD dwSpMajorVersion, DWORD dwSpMinorVersion, PDWORD pdwReturnedProductType); -void BecomeDPIAware(); diff --git a/LegacyUpdate/ElevationHelper.cpp b/LegacyUpdate/ElevationHelper.cpp deleted file mode 100644 index 0866972..0000000 --- a/LegacyUpdate/ElevationHelper.cpp +++ /dev/null @@ -1,84 +0,0 @@ -// ElevationHelper.cpp : Implementation of CElevationHelper -#include "stdafx.h" -#include "Compat.h" -#include "ElevationHelper.h" -#include "HResult.h" -#include "Utils.h" -#include - -const BSTR permittedProgIDs[] = { - L"Microsoft.Update.", - NULL -}; - -BOOL ProgIDIsPermitted(PWSTR progID) { - if (progID == NULL) { - return FALSE; - } - - for (int i = 0; permittedProgIDs[i] != NULL; i++) { - if (wcsncmp(progID, permittedProgIDs[i], wcslen(permittedProgIDs[i])) == 0) { - return TRUE; - } - } - - return FALSE; -} - -STDMETHODIMP CoCreateInstanceAsAdmin(HWND hwnd, __in REFCLSID rclsid, __in REFIID riid, __deref_out void **ppv) { - WCHAR clsidString[45]; - StringFromGUID2(rclsid, clsidString, ARRAYSIZE(clsidString)); - - WCHAR monikerName[75]; - HRESULT hr = StringCchPrintf(monikerName, ARRAYSIZE(monikerName), L"Elevation:Administrator!new:%s", clsidString); - if (!SUCCEEDED(hr)) { - return hr; - } - - BIND_OPTS3 bindOpts; - memset(&bindOpts, 0, sizeof(bindOpts)); - bindOpts.cbStruct = sizeof(bindOpts); - bindOpts.hwnd = hwnd; - bindOpts.dwClassContext = CLSCTX_LOCAL_SERVER; - return CoGetObject(monikerName, &bindOpts, riid, ppv); -} - -CElevationHelper::CElevationHelper() { - BecomeDPIAware(); -} - -STDMETHODIMP CElevationHelper::CreateObject(BSTR progID, IDispatch **retval) { - if (progID == NULL) { - return E_INVALIDARG; - } - - HRESULT hr = S_OK; - CComPtr object; - if (!ProgIDIsPermitted(progID)) { - hr = E_ACCESSDENIED; - goto end; - } - - CLSID clsid; - hr = CLSIDFromProgID(progID, &clsid); - if (!SUCCEEDED(hr)) { - goto end; - } - - hr = object.CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER); - if (!SUCCEEDED(hr)) { - goto end; - } - - *retval = object.Detach(); - -end: - if (!SUCCEEDED(hr)) { - TRACE("CreateObject(%ls) failed: %ls\n", progID, GetMessageForHresult(hr)); - } - return hr; -} - -STDMETHODIMP CElevationHelper::Reboot(void) { - return ::Reboot(); -} diff --git a/LegacyUpdate/ElevationHelper.h b/LegacyUpdate/ElevationHelper.h deleted file mode 100644 index 3b91578..0000000 --- a/LegacyUpdate/ElevationHelper.h +++ /dev/null @@ -1,45 +0,0 @@ -#pragma once - -// ElevationHelper.h : Declaration of the CElevationHelper class. - -#include -#include "resource.h" -#include "LegacyUpdate_i.h" - -BOOL ProgIDIsPermitted(PWSTR progID); -STDMETHODIMP CoCreateInstanceAsAdmin(HWND hwnd, __in REFCLSID rclsid, __in REFIID riid, __deref_out void **ppv); - -// CElevationHelper -class ATL_NO_VTABLE CElevationHelper : - public CComObjectRootEx, - public CComCoClass, - public ISupportErrorInfo, - public IDispatchImpl { - -public: - CElevationHelper(); - - DECLARE_REGISTRY_RESOURCEID(IDR_ELEVATIONHELPER) - - BEGIN_COM_MAP(CElevationHelper) - COM_INTERFACE_ENTRY(IElevationHelper) - COM_INTERFACE_ENTRY(IDispatch) - COM_INTERFACE_ENTRY(ISupportErrorInfo) - END_COM_MAP() - - // ISupportsErrorInfo - STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid) { - return IsEqualGUID(riid, IID_IElevationHelper) ? S_OK : S_FALSE; - } - - // IElevationHelper - DECLARE_PROTECT_FINAL_CONSTRUCT() - - HRESULT FinalConstruct() { return S_OK; } - void FinalRelease() {} - - STDMETHODIMP CreateObject(BSTR progID, IDispatch **retval); - STDMETHODIMP Reboot(void); -}; - -OBJECT_ENTRY_AUTO(__uuidof(ElevationHelper), CElevationHelper) diff --git a/LegacyUpdate/ElevationHelper.rgs b/LegacyUpdate/ElevationHelper.rgs deleted file mode 100644 index 381426c..0000000 --- a/LegacyUpdate/ElevationHelper.rgs +++ /dev/null @@ -1,31 +0,0 @@ -HKCR -{ - LegacyUpdate.ElevationHelper.1 = s 'Legacy Update Elevation Helper' - { - CLSID = s '{84F517AD-6438-478F-BEA8-F0B808DC257F}' - } - LegacyUpdate.ElevationHelper = s 'Legacy Update Elevation Helper' - { - CurVer = s 'LegacyUpdate.ElevationHelper.1' - } - NoRemove CLSID - { - ForceRemove {84F517AD-6438-478F-BEA8-F0B808DC257F} = s 'Legacy Update Elevation Helper' - { - ProgID = s 'LegacyUpdate.ElevationHelper.1' - VersionIndependentProgID = s 'LegacyUpdate.ElevationHelper' - InprocServer32 = s '%MODULE%' - { - val ThreadingModel = s 'Apartment' - } - val AppID = s '%APPID%' - val LocalizedString = s '@%MODULE%,-1' - TypeLib = s '{05D22F33-C7C3-4C90-BDD9-CEDC86EA8FBE}' - Version = s '1.0' - Elevation - { - val Enabled = d '1' - } - } - } -} diff --git a/LegacyUpdate/IUpdateInstaller4.h b/LegacyUpdate/IUpdateInstaller4.h deleted file mode 100644 index 53e6998..0000000 --- a/LegacyUpdate/IUpdateInstaller4.h +++ /dev/null @@ -1,650 +0,0 @@ -#pragma once -#include - -// Copied from wuapi.h in Windows SDK 10.0.19041.0 - -#ifndef __IUpdateInstaller3_FWD_DEFINED__ -#define __IUpdateInstaller3_FWD_DEFINED__ -typedef interface IUpdateInstaller3 IUpdateInstaller3; - -#endif /* __IUpdateInstaller3_FWD_DEFINED__ */ - -#ifndef __IUpdateInstaller4_FWD_DEFINED__ -#define __IUpdateInstaller4_FWD_DEFINED__ -typedef interface IUpdateInstaller4 IUpdateInstaller4; - -#endif /* __IUpdateInstaller4_FWD_DEFINED__ */ - -// {16d11c35-099a-48d0-8338-5fae64047f8e} -DEFINE_GUID(IID_IUpdateInstaller3,0x16d11c35,0x099a,0x48d0,0x83,0x38,0x5f,0xae,0x64,0x04,0x7f,0x8e); - -// {EF8208EA-2304-492D-9109-23813B0958E1} -DEFINE_GUID(IID_IUpdateInstaller4, 0xef8208ea, 0x2304, 0x492d, 0x91, 0x9, 0x23, 0x81, 0x3b, 0x9, 0x58, 0xe1); - -#ifndef __IUpdateInstaller3_INTERFACE_DEFINED__ -#define __IUpdateInstaller3_INTERFACE_DEFINED__ - -/* interface IUpdateInstaller3 */ -/* [hidden][unique][uuid][nonextensible][dual][oleautomation][object][helpstring] */ - - -EXTERN_C const IID IID_IUpdateInstaller3; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("16d11c35-099a-48d0-8338-5fae64047f8e") - IUpdateInstaller3 : public IUpdateInstaller2 - { - public: - virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_AttemptCloseAppsIfNecessary( - /* [retval][out] */ __RPC__out VARIANT_BOOL *retval) = 0; - - virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_AttemptCloseAppsIfNecessary( - /* [in] */ VARIANT_BOOL value) = 0; - - }; - - -#else /* C style interface */ - - typedef struct IUpdateInstaller3Vtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - __RPC__in IUpdateInstaller3 * This, - /* [in] */ __RPC__in REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - __RPC__in IUpdateInstaller3 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - __RPC__in IUpdateInstaller3 * This); - - HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( - __RPC__in IUpdateInstaller3 * This, - /* [out] */ __RPC__out UINT *pctinfo); - - HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( - __RPC__in IUpdateInstaller3 * This, - /* [in] */ UINT iTInfo, - /* [in] */ LCID lcid, - /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); - - HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( - __RPC__in IUpdateInstaller3 * This, - /* [in] */ __RPC__in REFIID riid, - /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, - /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, - /* [in] */ LCID lcid, - /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); - - /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( - IUpdateInstaller3 * This, - /* [annotation][in] */ - _In_ DISPID dispIdMember, - /* [annotation][in] */ - _In_ REFIID riid, - /* [annotation][in] */ - _In_ LCID lcid, - /* [annotation][in] */ - _In_ WORD wFlags, - /* [annotation][out][in] */ - _In_ DISPPARAMS *pDispParams, - /* [annotation][out] */ - _Out_opt_ VARIANT *pVarResult, - /* [annotation][out] */ - _Out_opt_ EXCEPINFO *pExcepInfo, - /* [annotation][out] */ - _Out_opt_ UINT *puArgErr); - - /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ClientApplicationID )( - __RPC__in IUpdateInstaller3 * This, - /* [retval][out] */ __RPC__deref_out_opt BSTR *retval); - - /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_ClientApplicationID )( - __RPC__in IUpdateInstaller3 * This, - /* [in] */ __RPC__in BSTR value); - - /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_IsForced )( - __RPC__in IUpdateInstaller3 * This, - /* [retval][out] */ __RPC__out VARIANT_BOOL *retval); - - /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_IsForced )( - __RPC__in IUpdateInstaller3 * This, - /* [in] */ VARIANT_BOOL value); - - /* [helpstring][restricted][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ParentHwnd )( - __RPC__in IUpdateInstaller3 * This, - /* [retval][out] */ __RPC__deref_out_opt HWND *retval); - - /* [helpstring][restricted][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_ParentHwnd )( - __RPC__in IUpdateInstaller3 * This, - /* [unique][in] */ __RPC__in_opt HWND value); - - /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_ParentWindow )( - __RPC__in IUpdateInstaller3 * This, - /* [unique][in] */ __RPC__in_opt IUnknown *value); - - /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ParentWindow )( - __RPC__in IUpdateInstaller3 * This, - /* [retval][out] */ __RPC__deref_out_opt IUnknown **retval); - - /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Updates )( - __RPC__in IUpdateInstaller3 * This, - /* [retval][out] */ __RPC__deref_out_opt IUpdateCollection **retval); - - /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Updates )( - __RPC__in IUpdateInstaller3 * This, - /* [in] */ __RPC__in_opt IUpdateCollection *value); - - /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *BeginInstall )( - __RPC__in IUpdateInstaller3 * This, - /* [in] */ __RPC__in_opt IUnknown *onProgressChanged, - /* [in] */ __RPC__in_opt IUnknown *onCompleted, - /* [in] */ VARIANT state, - /* [retval][out] */ __RPC__deref_out_opt IInstallationJob **retval); - - /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *BeginUninstall )( - __RPC__in IUpdateInstaller3 * This, - /* [in] */ __RPC__in_opt IUnknown *onProgressChanged, - /* [in] */ __RPC__in_opt IUnknown *onCompleted, - /* [in] */ VARIANT state, - /* [retval][out] */ __RPC__deref_out_opt IInstallationJob **retval); - - /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EndInstall )( - __RPC__in IUpdateInstaller3 * This, - /* [in] */ __RPC__in_opt IInstallationJob *value, - /* [retval][out] */ __RPC__deref_out_opt IInstallationResult **retval); - - /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EndUninstall )( - __RPC__in IUpdateInstaller3 * This, - /* [in] */ __RPC__in_opt IInstallationJob *value, - /* [retval][out] */ __RPC__deref_out_opt IInstallationResult **retval); - - /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Install )( - __RPC__in IUpdateInstaller3 * This, - /* [retval][out] */ __RPC__deref_out_opt IInstallationResult **retval); - - /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *RunWizard )( - __RPC__in IUpdateInstaller3 * This, - /* [defaultvalue][unique][in] */ __RPC__in_opt BSTR dialogTitle, - /* [retval][out] */ __RPC__deref_out_opt IInstallationResult **retval); - - /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_IsBusy )( - __RPC__in IUpdateInstaller3 * This, - /* [retval][out] */ __RPC__out VARIANT_BOOL *retval); - - /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Uninstall )( - __RPC__in IUpdateInstaller3 * This, - /* [retval][out] */ __RPC__deref_out_opt IInstallationResult **retval); - - /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_AllowSourcePrompts )( - __RPC__in IUpdateInstaller3 * This, - /* [retval][out] */ __RPC__out VARIANT_BOOL *retval); - - /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_AllowSourcePrompts )( - __RPC__in IUpdateInstaller3 * This, - /* [in] */ VARIANT_BOOL value); - - /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_RebootRequiredBeforeInstallation )( - __RPC__in IUpdateInstaller3 * This, - /* [retval][out] */ __RPC__out VARIANT_BOOL *retval); - - /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ForceQuiet )( - __RPC__in IUpdateInstaller3 * This, - /* [retval][out] */ __RPC__out VARIANT_BOOL *retval); - - /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_ForceQuiet )( - __RPC__in IUpdateInstaller3 * This, - /* [in] */ VARIANT_BOOL value); - - /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_AttemptCloseAppsIfNecessary )( - __RPC__in IUpdateInstaller3 * This, - /* [retval][out] */ __RPC__out VARIANT_BOOL *retval); - - /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_AttemptCloseAppsIfNecessary )( - __RPC__in IUpdateInstaller3 * This, - /* [in] */ VARIANT_BOOL value); - - END_INTERFACE - } IUpdateInstaller3Vtbl; - - interface IUpdateInstaller3 - { - CONST_VTBL struct IUpdateInstaller3Vtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define IUpdateInstaller3_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define IUpdateInstaller3_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define IUpdateInstaller3_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define IUpdateInstaller3_GetTypeInfoCount(This,pctinfo) \ - ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) - -#define IUpdateInstaller3_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ - ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) - -#define IUpdateInstaller3_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ - ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) - -#define IUpdateInstaller3_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ - ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) - - -#define IUpdateInstaller3_get_ClientApplicationID(This,retval) \ - ( (This)->lpVtbl -> get_ClientApplicationID(This,retval) ) - -#define IUpdateInstaller3_put_ClientApplicationID(This,value) \ - ( (This)->lpVtbl -> put_ClientApplicationID(This,value) ) - -#define IUpdateInstaller3_get_IsForced(This,retval) \ - ( (This)->lpVtbl -> get_IsForced(This,retval) ) - -#define IUpdateInstaller3_put_IsForced(This,value) \ - ( (This)->lpVtbl -> put_IsForced(This,value) ) - -#define IUpdateInstaller3_get_ParentHwnd(This,retval) \ - ( (This)->lpVtbl -> get_ParentHwnd(This,retval) ) - -#define IUpdateInstaller3_put_ParentHwnd(This,value) \ - ( (This)->lpVtbl -> put_ParentHwnd(This,value) ) - -#define IUpdateInstaller3_put_ParentWindow(This,value) \ - ( (This)->lpVtbl -> put_ParentWindow(This,value) ) - -#define IUpdateInstaller3_get_ParentWindow(This,retval) \ - ( (This)->lpVtbl -> get_ParentWindow(This,retval) ) - -#define IUpdateInstaller3_get_Updates(This,retval) \ - ( (This)->lpVtbl -> get_Updates(This,retval) ) - -#define IUpdateInstaller3_put_Updates(This,value) \ - ( (This)->lpVtbl -> put_Updates(This,value) ) - -#define IUpdateInstaller3_BeginInstall(This,onProgressChanged,onCompleted,state,retval) \ - ( (This)->lpVtbl -> BeginInstall(This,onProgressChanged,onCompleted,state,retval) ) - -#define IUpdateInstaller3_BeginUninstall(This,onProgressChanged,onCompleted,state,retval) \ - ( (This)->lpVtbl -> BeginUninstall(This,onProgressChanged,onCompleted,state,retval) ) - -#define IUpdateInstaller3_EndInstall(This,value,retval) \ - ( (This)->lpVtbl -> EndInstall(This,value,retval) ) - -#define IUpdateInstaller3_EndUninstall(This,value,retval) \ - ( (This)->lpVtbl -> EndUninstall(This,value,retval) ) - -#define IUpdateInstaller3_Install(This,retval) \ - ( (This)->lpVtbl -> Install(This,retval) ) - -#define IUpdateInstaller3_RunWizard(This,dialogTitle,retval) \ - ( (This)->lpVtbl -> RunWizard(This,dialogTitle,retval) ) - -#define IUpdateInstaller3_get_IsBusy(This,retval) \ - ( (This)->lpVtbl -> get_IsBusy(This,retval) ) - -#define IUpdateInstaller3_Uninstall(This,retval) \ - ( (This)->lpVtbl -> Uninstall(This,retval) ) - -#define IUpdateInstaller3_get_AllowSourcePrompts(This,retval) \ - ( (This)->lpVtbl -> get_AllowSourcePrompts(This,retval) ) - -#define IUpdateInstaller3_put_AllowSourcePrompts(This,value) \ - ( (This)->lpVtbl -> put_AllowSourcePrompts(This,value) ) - -#define IUpdateInstaller3_get_RebootRequiredBeforeInstallation(This,retval) \ - ( (This)->lpVtbl -> get_RebootRequiredBeforeInstallation(This,retval) ) - - -#define IUpdateInstaller3_get_ForceQuiet(This,retval) \ - ( (This)->lpVtbl -> get_ForceQuiet(This,retval) ) - -#define IUpdateInstaller3_put_ForceQuiet(This,value) \ - ( (This)->lpVtbl -> put_ForceQuiet(This,value) ) - - -#define IUpdateInstaller3_get_AttemptCloseAppsIfNecessary(This,retval) \ - ( (This)->lpVtbl -> get_AttemptCloseAppsIfNecessary(This,retval) ) - -#define IUpdateInstaller3_put_AttemptCloseAppsIfNecessary(This,value) \ - ( (This)->lpVtbl -> put_AttemptCloseAppsIfNecessary(This,value) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __IUpdateInstaller3_INTERFACE_DEFINED__ */ - - -#ifndef __IUpdateInstaller4_INTERFACE_DEFINED__ -#define __IUpdateInstaller4_INTERFACE_DEFINED__ - -/* interface IUpdateInstaller4 */ -/* [hidden][unique][uuid][nonextensible][dual][oleautomation][object][helpstring] */ - - -EXTERN_C const IID IID_IUpdateInstaller4; - -#if defined(__cplusplus) && !defined(CINTERFACE) - - MIDL_INTERFACE("EF8208EA-2304-492D-9109-23813B0958E1") - IUpdateInstaller4 : public IUpdateInstaller3 - { - public: - virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Commit( - /* [in] */ DWORD dwFlags) = 0; - - }; - - -#else /* C style interface */ - - typedef struct IUpdateInstaller4Vtbl - { - BEGIN_INTERFACE - - HRESULT ( STDMETHODCALLTYPE *QueryInterface )( - __RPC__in IUpdateInstaller4 * This, - /* [in] */ __RPC__in REFIID riid, - /* [annotation][iid_is][out] */ - _COM_Outptr_ void **ppvObject); - - ULONG ( STDMETHODCALLTYPE *AddRef )( - __RPC__in IUpdateInstaller4 * This); - - ULONG ( STDMETHODCALLTYPE *Release )( - __RPC__in IUpdateInstaller4 * This); - - HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( - __RPC__in IUpdateInstaller4 * This, - /* [out] */ __RPC__out UINT *pctinfo); - - HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( - __RPC__in IUpdateInstaller4 * This, - /* [in] */ UINT iTInfo, - /* [in] */ LCID lcid, - /* [out] */ __RPC__deref_out_opt ITypeInfo **ppTInfo); - - HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( - __RPC__in IUpdateInstaller4 * This, - /* [in] */ __RPC__in REFIID riid, - /* [size_is][in] */ __RPC__in_ecount_full(cNames) LPOLESTR *rgszNames, - /* [range][in] */ __RPC__in_range(0,16384) UINT cNames, - /* [in] */ LCID lcid, - /* [size_is][out] */ __RPC__out_ecount_full(cNames) DISPID *rgDispId); - - /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( - IUpdateInstaller4 * This, - /* [annotation][in] */ - _In_ DISPID dispIdMember, - /* [annotation][in] */ - _In_ REFIID riid, - /* [annotation][in] */ - _In_ LCID lcid, - /* [annotation][in] */ - _In_ WORD wFlags, - /* [annotation][out][in] */ - _In_ DISPPARAMS *pDispParams, - /* [annotation][out] */ - _Out_opt_ VARIANT *pVarResult, - /* [annotation][out] */ - _Out_opt_ EXCEPINFO *pExcepInfo, - /* [annotation][out] */ - _Out_opt_ UINT *puArgErr); - - /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ClientApplicationID )( - __RPC__in IUpdateInstaller4 * This, - /* [retval][out] */ __RPC__deref_out_opt BSTR *retval); - - /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_ClientApplicationID )( - __RPC__in IUpdateInstaller4 * This, - /* [in] */ __RPC__in BSTR value); - - /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_IsForced )( - __RPC__in IUpdateInstaller4 * This, - /* [retval][out] */ __RPC__out VARIANT_BOOL *retval); - - /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_IsForced )( - __RPC__in IUpdateInstaller4 * This, - /* [in] */ VARIANT_BOOL value); - - /* [helpstring][restricted][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ParentHwnd )( - __RPC__in IUpdateInstaller4 * This, - /* [retval][out] */ __RPC__deref_out_opt HWND *retval); - - /* [helpstring][restricted][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_ParentHwnd )( - __RPC__in IUpdateInstaller4 * This, - /* [unique][in] */ __RPC__in_opt HWND value); - - /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_ParentWindow )( - __RPC__in IUpdateInstaller4 * This, - /* [unique][in] */ __RPC__in_opt IUnknown *value); - - /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ParentWindow )( - __RPC__in IUpdateInstaller4 * This, - /* [retval][out] */ __RPC__deref_out_opt IUnknown **retval); - - /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Updates )( - __RPC__in IUpdateInstaller4 * This, - /* [retval][out] */ __RPC__deref_out_opt IUpdateCollection **retval); - - /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Updates )( - __RPC__in IUpdateInstaller4 * This, - /* [in] */ __RPC__in_opt IUpdateCollection *value); - - /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *BeginInstall )( - __RPC__in IUpdateInstaller4 * This, - /* [in] */ __RPC__in_opt IUnknown *onProgressChanged, - /* [in] */ __RPC__in_opt IUnknown *onCompleted, - /* [in] */ VARIANT state, - /* [retval][out] */ __RPC__deref_out_opt IInstallationJob **retval); - - /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *BeginUninstall )( - __RPC__in IUpdateInstaller4 * This, - /* [in] */ __RPC__in_opt IUnknown *onProgressChanged, - /* [in] */ __RPC__in_opt IUnknown *onCompleted, - /* [in] */ VARIANT state, - /* [retval][out] */ __RPC__deref_out_opt IInstallationJob **retval); - - /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EndInstall )( - __RPC__in IUpdateInstaller4 * This, - /* [in] */ __RPC__in_opt IInstallationJob *value, - /* [retval][out] */ __RPC__deref_out_opt IInstallationResult **retval); - - /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EndUninstall )( - __RPC__in IUpdateInstaller4 * This, - /* [in] */ __RPC__in_opt IInstallationJob *value, - /* [retval][out] */ __RPC__deref_out_opt IInstallationResult **retval); - - /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Install )( - __RPC__in IUpdateInstaller4 * This, - /* [retval][out] */ __RPC__deref_out_opt IInstallationResult **retval); - - /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *RunWizard )( - __RPC__in IUpdateInstaller4 * This, - /* [defaultvalue][unique][in] */ __RPC__in_opt BSTR dialogTitle, - /* [retval][out] */ __RPC__deref_out_opt IInstallationResult **retval); - - /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_IsBusy )( - __RPC__in IUpdateInstaller4 * This, - /* [retval][out] */ __RPC__out VARIANT_BOOL *retval); - - /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Uninstall )( - __RPC__in IUpdateInstaller4 * This, - /* [retval][out] */ __RPC__deref_out_opt IInstallationResult **retval); - - /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_AllowSourcePrompts )( - __RPC__in IUpdateInstaller4 * This, - /* [retval][out] */ __RPC__out VARIANT_BOOL *retval); - - /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_AllowSourcePrompts )( - __RPC__in IUpdateInstaller4 * This, - /* [in] */ VARIANT_BOOL value); - - /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_RebootRequiredBeforeInstallation )( - __RPC__in IUpdateInstaller4 * This, - /* [retval][out] */ __RPC__out VARIANT_BOOL *retval); - - /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_ForceQuiet )( - __RPC__in IUpdateInstaller4 * This, - /* [retval][out] */ __RPC__out VARIANT_BOOL *retval); - - /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_ForceQuiet )( - __RPC__in IUpdateInstaller4 * This, - /* [in] */ VARIANT_BOOL value); - - /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_AttemptCloseAppsIfNecessary )( - __RPC__in IUpdateInstaller4 * This, - /* [retval][out] */ __RPC__out VARIANT_BOOL *retval); - - /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_AttemptCloseAppsIfNecessary )( - __RPC__in IUpdateInstaller4 * This, - /* [in] */ VARIANT_BOOL value); - - /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Commit )( - __RPC__in IUpdateInstaller4 * This, - /* [in] */ DWORD dwFlags); - - END_INTERFACE - } IUpdateInstaller4Vtbl; - - interface IUpdateInstaller4 - { - CONST_VTBL struct IUpdateInstaller4Vtbl *lpVtbl; - }; - - - -#ifdef COBJMACROS - - -#define IUpdateInstaller4_QueryInterface(This,riid,ppvObject) \ - ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) - -#define IUpdateInstaller4_AddRef(This) \ - ( (This)->lpVtbl -> AddRef(This) ) - -#define IUpdateInstaller4_Release(This) \ - ( (This)->lpVtbl -> Release(This) ) - - -#define IUpdateInstaller4_GetTypeInfoCount(This,pctinfo) \ - ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) - -#define IUpdateInstaller4_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ - ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) - -#define IUpdateInstaller4_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ - ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) - -#define IUpdateInstaller4_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ - ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) - - -#define IUpdateInstaller4_get_ClientApplicationID(This,retval) \ - ( (This)->lpVtbl -> get_ClientApplicationID(This,retval) ) - -#define IUpdateInstaller4_put_ClientApplicationID(This,value) \ - ( (This)->lpVtbl -> put_ClientApplicationID(This,value) ) - -#define IUpdateInstaller4_get_IsForced(This,retval) \ - ( (This)->lpVtbl -> get_IsForced(This,retval) ) - -#define IUpdateInstaller4_put_IsForced(This,value) \ - ( (This)->lpVtbl -> put_IsForced(This,value) ) - -#define IUpdateInstaller4_get_ParentHwnd(This,retval) \ - ( (This)->lpVtbl -> get_ParentHwnd(This,retval) ) - -#define IUpdateInstaller4_put_ParentHwnd(This,value) \ - ( (This)->lpVtbl -> put_ParentHwnd(This,value) ) - -#define IUpdateInstaller4_put_ParentWindow(This,value) \ - ( (This)->lpVtbl -> put_ParentWindow(This,value) ) - -#define IUpdateInstaller4_get_ParentWindow(This,retval) \ - ( (This)->lpVtbl -> get_ParentWindow(This,retval) ) - -#define IUpdateInstaller4_get_Updates(This,retval) \ - ( (This)->lpVtbl -> get_Updates(This,retval) ) - -#define IUpdateInstaller4_put_Updates(This,value) \ - ( (This)->lpVtbl -> put_Updates(This,value) ) - -#define IUpdateInstaller4_BeginInstall(This,onProgressChanged,onCompleted,state,retval) \ - ( (This)->lpVtbl -> BeginInstall(This,onProgressChanged,onCompleted,state,retval) ) - -#define IUpdateInstaller4_BeginUninstall(This,onProgressChanged,onCompleted,state,retval) \ - ( (This)->lpVtbl -> BeginUninstall(This,onProgressChanged,onCompleted,state,retval) ) - -#define IUpdateInstaller4_EndInstall(This,value,retval) \ - ( (This)->lpVtbl -> EndInstall(This,value,retval) ) - -#define IUpdateInstaller4_EndUninstall(This,value,retval) \ - ( (This)->lpVtbl -> EndUninstall(This,value,retval) ) - -#define IUpdateInstaller4_Install(This,retval) \ - ( (This)->lpVtbl -> Install(This,retval) ) - -#define IUpdateInstaller4_RunWizard(This,dialogTitle,retval) \ - ( (This)->lpVtbl -> RunWizard(This,dialogTitle,retval) ) - -#define IUpdateInstaller4_get_IsBusy(This,retval) \ - ( (This)->lpVtbl -> get_IsBusy(This,retval) ) - -#define IUpdateInstaller4_Uninstall(This,retval) \ - ( (This)->lpVtbl -> Uninstall(This,retval) ) - -#define IUpdateInstaller4_get_AllowSourcePrompts(This,retval) \ - ( (This)->lpVtbl -> get_AllowSourcePrompts(This,retval) ) - -#define IUpdateInstaller4_put_AllowSourcePrompts(This,value) \ - ( (This)->lpVtbl -> put_AllowSourcePrompts(This,value) ) - -#define IUpdateInstaller4_get_RebootRequiredBeforeInstallation(This,retval) \ - ( (This)->lpVtbl -> get_RebootRequiredBeforeInstallation(This,retval) ) - - -#define IUpdateInstaller4_get_ForceQuiet(This,retval) \ - ( (This)->lpVtbl -> get_ForceQuiet(This,retval) ) - -#define IUpdateInstaller4_put_ForceQuiet(This,value) \ - ( (This)->lpVtbl -> put_ForceQuiet(This,value) ) - - -#define IUpdateInstaller4_get_AttemptCloseAppsIfNecessary(This,retval) \ - ( (This)->lpVtbl -> get_AttemptCloseAppsIfNecessary(This,retval) ) - -#define IUpdateInstaller4_put_AttemptCloseAppsIfNecessary(This,value) \ - ( (This)->lpVtbl -> put_AttemptCloseAppsIfNecessary(This,value) ) - - -#define IUpdateInstaller4_Commit(This,dwFlags) \ - ( (This)->lpVtbl -> Commit(This,dwFlags) ) - -#endif /* COBJMACROS */ - - -#endif /* C style interface */ - - - - -#endif /* __IUpdateInstaller4_INTERFACE_DEFINED__ */ diff --git a/LegacyUpdate/LaunchUpdateSite.cpp b/LegacyUpdate/LaunchUpdateSite.cpp deleted file mode 100644 index 87ead92..0000000 --- a/LegacyUpdate/LaunchUpdateSite.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "stdafx.h" -#include "Exec.h" -#include "HResult.h" -#include "LegacyUpdate.h" -#include - -// Function signature required by Rundll32.exe. -void CALLBACK LaunchUpdateSite(HWND hwnd, HINSTANCE hInstance, LPSTR lpszCmdLine, int nCmdShow) { - HRESULT hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - LPWSTR path; - - if (!SUCCEEDED(hr)) { - goto end; - } - - // This just calls LegacyUpdate.exe now for backwards compatibility. - hr = GetInstallPath(&path); - if (!SUCCEEDED(hr)) { - goto end; - } - - PathAppend(path, L"LegacyUpdate.exe"); - - DWORD code; - hr = Exec(L"open", path, NULL, NULL, nCmdShow, TRUE, &code); - if (SUCCEEDED(hr)) { - hr = HRESULT_FROM_WIN32(code); - } - -end: - if (!SUCCEEDED(hr)) { - MessageBox(NULL, GetMessageForHresult(hr), L"Legacy Update", MB_OK | MB_ICONERROR); - } - - CoUninitialize(); -} diff --git a/LegacyUpdate/LaunchUpdateSite.h b/LegacyUpdate/LaunchUpdateSite.h deleted file mode 100644 index cfe1335..0000000 --- a/LegacyUpdate/LaunchUpdateSite.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -void CALLBACK LaunchUpdateSite(HWND hwnd, HINSTANCE hinstance, LPSTR lpszCmdLine, int nCmdShow); \ No newline at end of file diff --git a/LegacyUpdate/LegacyUpdate.def b/LegacyUpdate/LegacyUpdate.def deleted file mode 100644 index 92305f8..0000000 --- a/LegacyUpdate/LegacyUpdate.def +++ /dev/null @@ -1,14 +0,0 @@ -; LegacyUpdate.def : Declares the module parameters. - -EXPORTS - ; Registration - DllCanUnloadNow PRIVATE - DllGetClassObject PRIVATE - DllRegisterServer PRIVATE - DllUnregisterServer PRIVATE - - ; Rundll32 - LaunchUpdateSite PRIVATE - - ; Internal use - GetMessageForHresult diff --git a/LegacyUpdate/LegacyUpdate.idl b/LegacyUpdate/LegacyUpdate.idl deleted file mode 100644 index ed1e581..0000000 --- a/LegacyUpdate/LegacyUpdate.idl +++ /dev/null @@ -1,126 +0,0 @@ -// LegacyUpdate.idl : IDL source for LegacyUpdate -// - -// This file will be processed by the MIDL tool to -// produce the type library (LegacyUpdate.tlb) and marshalling code. - -#include -#include -import "oaidl.idl"; -import "ocidl.idl"; -import "wuapi.idl"; - -typedef enum OSVersionField { - e_majorVer = 0, - e_minorVer = 1, - e_buildNumber = 2, - e_platform = 3, - e_SPMajor = 4, - e_SPMinor = 5, - e_productSuite = 6, - e_productType = 7, - e_systemMetric = 8, - e_SPVersionString = 9, - e_controlVersionString = 10, - e_VistaProductType = 11, - e_productName = 12, - e_displayVersion = 13, - e_maxOSVersionFieldValue = 13 -} OSVersionField; - -typedef enum UserType { - e_nonAdmin = 0, - e_admin = 2, - e_elevated = 3 -} UserType; - -[ - object, - uuid(C33085BB-C3E1-4D27-A214-AF01953DF5E5), - dual, - nonextensible, - helpstring("ILegacyUpdateCtrl Interface"), - pointer_default(unique) -] -interface ILegacyUpdateCtrl : IDispatch { - [id(1)] HRESULT CheckControl([out, retval] VARIANT_BOOL *retval); - [id(2)] HRESULT MessageForHresult(LONG inHresult, [out, retval] BSTR *retval); - [id(3)] HRESULT GetOSVersionInfo(OSVersionField osField, LONG systemMetric, [out, retval] VARIANT *retval); - [id(14)] HRESULT RequestElevation(void); - [id(4)] HRESULT CreateObject(BSTR progID, [out, retval] IDispatch **retval); - [id(15)] HRESULT SetBrowserHwnd(IUpdateInstaller *installer); - [id(5)] HRESULT GetUserType([out, retval] UserType *retval); - [id(8)] HRESULT RebootIfRequired(void); - [id(9)] HRESULT ViewWindowsUpdateLog(void); - [id(13)] HRESULT OpenWindowsUpdateSettings(void); - - [id(6), propget] HRESULT IsRebootRequired([out, retval] VARIANT_BOOL *retval); - [id(7), propget] HRESULT IsWindowsUpdateDisabled([out, retval] VARIANT_BOOL *retval); - [id(10), propget] HRESULT IsUsingWsusServer([out, retval] VARIANT_BOOL *retval); - [id(11), propget] HRESULT WsusServerUrl([out, retval] BSTR *retval); - [id(12), propget] HRESULT WsusStatusServerUrl([out, retval] BSTR *retval); -}; - -[ - object, - uuid(4524BFBF-70BD-4EAC-AD33-6BADA4FB0638), - dual, - nonextensible, - pointer_default(unique) -] -interface IProgressBarControl : IDispatch -{ - [id(1), propget] HRESULT Value([out, retval] SHORT *retval); - [id(1), propput] HRESULT Value([in] SHORT newVal); -}; - -[ - object, - uuid(3236E684-0E4B-4780-9F31-F1983F5AB78D), - dual, - nonextensible, - pointer_default(unique), - oleautomation -] -interface IElevationHelper : IDispatch -{ - [id(1)] HRESULT CreateObject(BSTR progID, [out, retval] IDispatch **retval); - [id(2)] HRESULT Reboot(void); -}; - -[ - uuid(05D22F33-C7C3-4C90-BDD9-CEDC86EA8FBE), - version(1.0), - helpstring("Legacy Update Control") -] -library LegacyUpdateLib { - importlib(STDOLE_TLB); - - [ - uuid(AD28E0DF-5F5A-40B5-9432-85EFD97D1F9F), - control, - helpstring("LegacyUpdateCtrl Class") - ] - coclass LegacyUpdateCtrl { - [default] interface ILegacyUpdateCtrl; - }; - - [ - uuid(7B875A2F-2DFB-4D38-91F5-5C0BFB74C377), - control, - helpstring("ProgressBarControl Class") - ] - coclass ProgressBarControl - { - [default] interface IProgressBarControl; - }; - - [ - uuid(84F517AD-6438-478F-BEA8-F0B808DC257F), - helpstring("ElevationHelper Class") - ] - coclass ElevationHelper - { - [default] interface IElevationHelper; - }; -}; diff --git a/LegacyUpdate/LegacyUpdate.rc b/LegacyUpdate/LegacyUpdate.rc deleted file mode 100644 index 2e10e50..0000000 --- a/LegacyUpdate/LegacyUpdate.rc +++ /dev/null @@ -1,134 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" -#include "Version.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#ifndef APSTUDIO_INVOKED -#include "targetver.h" -#endif -#include "winres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (United States) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(65001) - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -2 TEXTINCLUDE -BEGIN - "#ifndef APSTUDIO_INVOKED\r\n" - "#include ""targetver.h""\r\n" - "#endif\r\n" - "#include ""winres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "1 TYPELIB ""LegacyUpdate.tlb""\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH,VERSION_BUILD - PRODUCTVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH,VERSION_BUILD - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", "Hashbang Productions" - VALUE "FileDescription", "Legacy Update" - VALUE "FileVersion", VERSION_STRING - VALUE "InternalName", "LegacyUpdate.dll" - VALUE "LegalCopyright", "© Hashbang Productions. All rights reserved." - VALUE "OriginalFilename", "LegacyUpdate.dll" - VALUE "ProductName", "Legacy Update" - VALUE "ProductVersion", VERSION_STRING - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// REGISTRY -// - -IDR_LEGACYUPDATEOCX REGISTRY "LegacyUpdate.rgs" - -IDR_LEGACYUPDATECTRL REGISTRY "LegacyUpdateCtrl.rgs" - -IDR_PROGRESSBARCONTROL REGISTRY "ProgressBarControl.rgs" - -IDR_ELEVATIONHELPER REGISTRY "ElevationHelper.rgs" - - -///////////////////////////////////////////////////////////////////////////// -// -// String Table -// - -STRINGTABLE -BEGIN - IDS_LEGACYUPDATE "Legacy Update" -END - -#endif // English (United States) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// -1 TYPELIB "LegacyUpdate.tlb" - -#include "wuerror.rc" - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/LegacyUpdate/LegacyUpdate.rgs b/LegacyUpdate/LegacyUpdate.rgs deleted file mode 100644 index 6d2f147..0000000 --- a/LegacyUpdate/LegacyUpdate.rgs +++ /dev/null @@ -1,14 +0,0 @@ -HKCR -{ - NoRemove AppID - { - '%APPID%' = s 'Legacy Update Control' - { - val DllSurrogate = s '' - } - 'LegacyUpdate.dll' - { - val AppID = s '%APPID%' - } - } -} diff --git a/LegacyUpdate/LegacyUpdate.vcxproj b/LegacyUpdate/LegacyUpdate.vcxproj deleted file mode 100644 index 6acf74c..0000000 --- a/LegacyUpdate/LegacyUpdate.vcxproj +++ /dev/null @@ -1,601 +0,0 @@ - - - - - Debug-VC08 - x64 - - - Debug-VC17 - Win32 - - - Debug-VC08 - Win32 - - - Debug-VC17 - x64 - - - Release - Win32 - - - Release - x64 - - - - {95F3E1A1-5DDA-4C4D-B52B-981D46E6C98B} - LegacyUpdate - AtlProj - 7.0 - - - - DynamicLibrary - true - Unicode - v90 - Static - - - DynamicLibrary - true - Unicode - v90 - Static - - - DynamicLibrary - true - Unicode - v141_xp - false - - - DynamicLibrary - true - Unicode - v141_xp - false - - - DynamicLibrary - false - true - Unicode - v90 - Static - false - - - DynamicLibrary - false - true - Unicode - v141_xp - false - Static - false - - - - - - - - - - - - - - - - - - - - - - - - - true - .dll - $(SolutionDir)\shared;$(IncludePath) - - - true - .dll - $(SolutionDir)\shared;$(IncludePath) - - - true - .dll - $(SolutionDir)\shared;$(IncludePath) - - - true - .dll - $(SolutionDir)\shared;$(IncludePath) - - - false - .dll - $(SolutionDir)\shared;$(IncludePath) - - - false - .dll - $(SolutionDir)\shared;$(IncludePath) - - - - Use - Level3 - Disabled - WIN32;_WINDOWS;_DEBUG;_USRDLL;_MERGE_PROXYSTUB;%(PreprocessorDefinitions) - true - - false - MultiThreadedDebug - - - Windows - true - .\LegacyUpdate.def - $(OutDir)$(ProjectName).dll - /filealign:0x200 %(AdditionalOptions) - false - - - _DEBUG;%(PreprocessorDefinitions) - false - Win32 - true - $(IntDir)LegacyUpdate.tlb - LegacyUpdate_i.h - - - LegacyUpdate_i.c - LegacyUpdate_p.c - true - - - 0x0409 - _DEBUG;%(PreprocessorDefinitions) - $(IntDir);%(AdditionalIncludeDirectories) - - - - - - - cmd /c start /min "" taskkill /im iexplore.exe - - - - - Use - Level3 - Disabled - WIN32;_WINDOWS;_DEBUG;_USRDLL;_MERGE_PROXYSTUB;%(PreprocessorDefinitions) - true - - false - MultiThreadedDebug - - - Windows - true - .\LegacyUpdate.def - $(OutDir)$(ProjectName).dll - /filealign:0x200 %(AdditionalOptions) - false - - - _DEBUG;%(PreprocessorDefinitions) - false - true - $(IntDir)LegacyUpdate.tlb - LegacyUpdate_i.h - - - LegacyUpdate_i.c - LegacyUpdate_p.c - - - 0x0409 - _DEBUG;%(PreprocessorDefinitions) - $(IntDir);%(AdditionalIncludeDirectories) - - - - - - - cmd /c start /min "" taskkill /im iexplore.exe - - - - - Use - Level3 - Disabled - WIN32;_WINDOWS;_DEBUG;_USRDLL;_MERGE_PROXYSTUB;%(PreprocessorDefinitions) - true - - MultiThreadedDebug - - - Windows - true - .\LegacyUpdate.def - $(OutDir)$(ProjectName).dll - /filealign:0x200 %(AdditionalOptions) - false - - - _DEBUG;%(PreprocessorDefinitions) - false - Win32 - true - $(IntDir)LegacyUpdate.tlb - LegacyUpdate_i.h - - - LegacyUpdate_i.c - LegacyUpdate_p.c - true - - - 0x0409 - _DEBUG;%(PreprocessorDefinitions) - $(IntDir);%(AdditionalIncludeDirectories) - - - - - - - cmd /c start /min "" taskkill /im iexplore.exe - - - - - Use - Level3 - Disabled - WIN32;_WINDOWS;_DEBUG;_USRDLL;_MERGE_PROXYSTUB;%(PreprocessorDefinitions) - true - - MultiThreadedDebug - - - Windows - true - .\LegacyUpdate.def - $(OutDir)$(ProjectName).dll - /filealign:0x200 %(AdditionalOptions) - false - - - _DEBUG;%(PreprocessorDefinitions) - false - true - $(IntDir)LegacyUpdate.tlb - LegacyUpdate_i.h - - - LegacyUpdate_i.c - LegacyUpdate_p.c - - - 0x0409 - _DEBUG;%(PreprocessorDefinitions) - $(IntDir);%(AdditionalIncludeDirectories) - - - - - - - cmd /c start /min "" taskkill /im iexplore.exe - - - - - Level3 - Use - - - true - - - WIN32;_WINDOWS;NDEBUG;_USRDLL;_MERGE_PROXYSTUB;%(PreprocessorDefinitions) - true - - Size - MultiThreaded - - - Windows - true - true - true - .\LegacyUpdate.def - $(OutDir)$(ProjectName).dll - - - /filealign:0x200 %(AdditionalOptions) - - - _DEBUG;%(PreprocessorDefinitions) - false - Win32 - true - $(IntDir)LegacyUpdate.tlb - LegacyUpdate_i.h - - - LegacyUpdate_i.c - LegacyUpdate_p.c - true - - - 0x0409 - NDEBUG;%(PreprocessorDefinitions) - $(IntDir);%(AdditionalIncludeDirectories) - - - cmd /c start /min "" taskkill /im iexplore.exe - - - - - Level3 - Use - - - true - - - WIN32;_WINDOWS;NDEBUG;_USRDLL;_MERGE_PROXYSTUB;%(PreprocessorDefinitions) - true - - Size - MultiThreaded - - - Windows - true - true - true - .\LegacyUpdate.def - $(OutDir)$(ProjectName).dll - - - /filealign:0x200 %(AdditionalOptions) - - - _DEBUG;%(PreprocessorDefinitions) - false - true - $(IntDir)LegacyUpdate.tlb - LegacyUpdate_i.h - - - LegacyUpdate_i.c - LegacyUpdate_p.c - - - 0x0409 - NDEBUG;%(PreprocessorDefinitions) - $(IntDir);%(AdditionalIncludeDirectories) - - - - - - - - - - true - - - - false - Document - false - mc %(FullPath) -r $(IntDir) -h $(IntDir) - Compiling Message Table - $(IntDir)%(Identity).rc;$(IntDir)%(Identity).h;$(IntDir)MSG0409.bin - mc %(FullPath) -r $(IntDir) -h $(IntDir) - Compiling Message Table - $(IntDir)%(Identity).rc;$(IntDir)%(Identity).h;$(IntDir)MSG0409.bin - - - - - mc %(FullPath) -r $(IntDir) -h $(IntDir) - mc %(FullPath) -r $(IntDir) -h $(IntDir) - mc %(FullPath) -r $(IntDir) -h $(IntDir) - mc %(FullPath) -r $(IntDir) -h $(IntDir) - Compiling Message Table - Compiling Message Table - Compiling Message Table - Compiling Message Table - $(IntDir)%(Identity).rc;$(IntDir)%(Identity).h;$(IntDir)MSG0409.bin - $(IntDir)%(Identity).rc;$(IntDir)%(Identity).h;$(IntDir)MSG0409.bin - $(IntDir)%(Identity).rc;$(IntDir)%(Identity).h;$(IntDir)MSG0409.bin - $(IntDir)%(Identity).rc;$(IntDir)%(Identity).h;$(IntDir)MSG0409.bin - false - false - false - false - - - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - CompileAsCpp - - - - - - - - Create - Create - Create - Create - Create - Create - - - - - - - - false - false - - - - - false - false - - - - - false - false - - - - - - - false - false - - - - - false - false - - - - - false - false - - - - - - - false - false - - - - - false - false - - - - - false - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/LegacyUpdate/LegacyUpdate.vcxproj.filters b/LegacyUpdate/LegacyUpdate.vcxproj.filters deleted file mode 100644 index cd6b79c..0000000 --- a/LegacyUpdate/LegacyUpdate.vcxproj.filters +++ /dev/null @@ -1,168 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {7f88225c-35ff-498e-a402-49bc456952b5} - - - - - Source Files - - - Resource Files - - - Resource Files - - - Resource Files - - - Resource Files - - - - Resource Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Shared - - - Shared - - - Shared - - - Shared - - - Shared - - - Shared - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Shared - - - Shared - - - Shared - - - Shared - - - Header Files - - - Shared - - - Shared - - - - - Resource Files - - - - - Source Files - - - Source Files - - - - - Resource Files - - - \ No newline at end of file diff --git a/LegacyUpdate/LegacyUpdateCtrl.cpp b/LegacyUpdate/LegacyUpdateCtrl.cpp deleted file mode 100644 index 3939e51..0000000 --- a/LegacyUpdate/LegacyUpdateCtrl.cpp +++ /dev/null @@ -1,521 +0,0 @@ -// LegacyUpdateCtrl.cpp : Implementation of the CLegacyUpdateCtrl ActiveX Control class. - -#include "stdafx.h" -#include "LegacyUpdateCtrl.h" -#include "Compat.h" -#include "ElevationHelper.h" -#include "Exec.h" -#include "HResult.h" -#include "LegacyUpdate.h" -#include "Registry.h" -#include "User.h" -#include "Utils.h" -#include "VersionInfo.h" -#include "WULog.h" -#include -#include -#include -#include "IUpdateInstaller4.h" - -#ifdef _DEBUG -#define new DEBUG_NEW -#endif - -const BSTR permittedHosts[] = { - L"legacyupdate.net", - L"test.legacyupdate.net", - NULL -}; - -// CLegacyUpdateCtrl message handlers - -IHTMLDocument2 *CLegacyUpdateCtrl::GetHTMLDocument() { - CComPtr clientSite; - HRESULT hr = GetClientSite(&clientSite); - if (!SUCCEEDED(hr) || clientSite == NULL) { - TRACE("GetDocument() failed: %ls\n", GetMessageForHresult(hr)); - return NULL; - } - - CComPtr container; - hr = clientSite->GetContainer(&container); - if (!SUCCEEDED(hr) || container == NULL) { - TRACE("GetDocument() failed: %ls\n", GetMessageForHresult(hr)); - return NULL; - } - - CComPtr document; - hr = container->QueryInterface(IID_IHTMLDocument2, (void **)&document); - if (!SUCCEEDED(hr) || document == NULL) { - TRACE("GetDocument() failed: %ls\n", GetMessageForHresult(hr)); - return NULL; - } - - return document.Detach(); -} - -HWND CLegacyUpdateCtrl::GetIEWindowHWND() { - CComPtr oleWindow; - HRESULT hr = QueryInterface(IID_IOleWindow, (void **)&oleWindow); - if (!SUCCEEDED(hr) || !oleWindow) { - goto end; - } - - HWND hwnd; - hr = oleWindow->GetWindow(&hwnd); - if (!SUCCEEDED(hr)) { - goto end; - } - - return hwnd; - -end: - if (!SUCCEEDED(hr)) { - TRACE("GetIEWindowHWND() failed: %ls\n", GetMessageForHresult(hr)); - } - return 0; -} - -BOOL CLegacyUpdateCtrl::IsPermitted(void) { - CComPtr document = GetHTMLDocument(); - if (document == NULL) { -#ifdef _DEBUG - // Allow debugging outside of IE (e.g. via PowerShell) - TRACE("GetHTMLDocument() failed - allowing anyway due to debug build\n"); - return TRUE; -#else - return FALSE; -#endif - } - - CComPtr location; - CComBSTR host; - HRESULT hr = document->get_location(&location); - if (!SUCCEEDED(hr) || location == NULL) { - goto end; - } - - hr = location->get_host(&host); - if (!SUCCEEDED(hr)) { - goto end; - } - - for (int i = 0; permittedHosts[i] != NULL; i++) { - if (wcscmp(host, permittedHosts[i]) == 0) { - return TRUE; - } - } - -end: - if (!SUCCEEDED(hr)) { - TRACE("IsPermitted() failed: %ls\n", GetMessageForHresult(hr)); - } - return FALSE; -} - -STDMETHODIMP CLegacyUpdateCtrl::GetElevatedHelper(CComPtr &retval) { - CComPtr elevatedHelper = m_elevatedHelper ? m_elevatedHelper : m_nonElevatedHelper; - if (elevatedHelper == NULL) { - // Use the helper directly, without elevation. It's the responsibility of the caller to ensure it - // is already running as admin on 2k/XP, or that it has requested elevation on Vista+. - HRESULT hr = m_nonElevatedHelper.CoCreateInstance(CLSID_ElevationHelper, NULL, CLSCTX_INPROC_SERVER); - if (!SUCCEEDED(hr)) { - return hr; - } - - elevatedHelper = m_nonElevatedHelper; - } - - retval = elevatedHelper; - return S_OK; -} - -#define DoIsPermittedCheck() \ - if (!IsPermitted()) { \ - return E_ACCESSDENIED; \ - } - -STDMETHODIMP CLegacyUpdateCtrl::SetClientSite(IOleClientSite *pClientSite) { - HRESULT hr = IOleObjectImpl::SetClientSite(pClientSite); - if (!SUCCEEDED(hr)) { - return hr; - } - - DoIsPermittedCheck(); - return S_OK; -} - -STDMETHODIMP CLegacyUpdateCtrl::CheckControl(VARIANT_BOOL *retval) { - DoIsPermittedCheck(); - - // Just return true so the site can confirm the control is working. - *retval = VARIANT_TRUE; - return S_OK; -} - -STDMETHODIMP CLegacyUpdateCtrl::MessageForHresult(LONG inHresult, BSTR *retval) { - DoIsPermittedCheck(); - *retval = SysAllocString(GetMessageForHresult(inHresult)); - return S_OK; -} - -STDMETHODIMP CLegacyUpdateCtrl::GetOSVersionInfo(OSVersionField osField, LONG systemMetric, VARIANT *retval) { - DoIsPermittedCheck(); - - VariantInit(retval); - - OSVERSIONINFOEX *versionInfo = GetVersionInfo(); - - switch (osField) { - case e_majorVer: - retval->vt = VT_UI4; - retval->ulVal = versionInfo->dwMajorVersion; - break; - - case e_minorVer: - retval->vt = VT_UI4; - retval->ulVal = versionInfo->dwMinorVersion; - break; - - case e_buildNumber: - retval->vt = VT_UI4; - retval->ulVal = versionInfo->dwBuildNumber; - break; - - case e_platform: - retval->vt = VT_UI4; - retval->ulVal = versionInfo->dwPlatformId; - break; - - case e_SPMajor: - retval->vt = VT_I4; - retval->lVal = versionInfo->wServicePackMajor; - break; - - case e_SPMinor: - retval->vt = VT_I4; - retval->lVal = versionInfo->wServicePackMinor; - break; - - case e_productSuite: - retval->vt = VT_I4; - retval->lVal = versionInfo->wSuiteMask; - break; - - case e_productType: - retval->vt = VT_I4; - retval->lVal = versionInfo->wProductType; - break; - - case e_systemMetric: - retval->vt = VT_I4; - retval->lVal = GetSystemMetrics(systemMetric); - break; - - case e_SPVersionString: { - LPWSTR data; - DWORD size; - HRESULT hr = GetRegistryString(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", L"BuildLab", 0, &data, &size); - retval->vt = VT_BSTR; - retval->bstrVal = SUCCEEDED(hr) - ? SysAllocStringLen(data, size - 1) - // BuildLab doesn't exist on Windows 2000. - : SysAllocString(versionInfo->szCSDVersion); - if (data) { - LocalFree(data); - } - break; - } - - case e_controlVersionString: { - LPWSTR data; - HRESULT hr = GetOwnVersion(&data); - if (!SUCCEEDED(hr)) { - return hr; - } - retval->vt = VT_BSTR; - retval->bstrVal = SysAllocString(data); - break; - } - - case e_VistaProductType: { - DWORD productType; - GetVistaProductInfo(versionInfo->dwMajorVersion, versionInfo->dwMinorVersion, versionInfo->wServicePackMajor, versionInfo->wServicePackMinor, &productType); - retval->vt = VT_UI4; - retval->ulVal = productType; - break; - } - - case e_productName: { - HRESULT hr = GetOSProductName(retval); - if (!SUCCEEDED(hr)) { - LPWSTR data; - DWORD size; - hr = GetRegistryString(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", L"ProductName", 0, &data, &size); - if (SUCCEEDED(hr)) { - retval->vt = VT_BSTR; - retval->bstrVal = SysAllocStringLen(data, size - 1); - } - } - break; - } - - case e_displayVersion: { - LPWSTR data; - DWORD size; - HRESULT hr = GetRegistryString(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", L"DisplayVersion", 0, &data, &size); - if (SUCCEEDED(hr)) { - retval->vt = VT_BSTR; - retval->bstrVal = SysAllocStringLen(data, size - 1); - LocalFree(data); - } - break; - } - } - - return S_OK; -} - -STDMETHODIMP CLegacyUpdateCtrl::RequestElevation() { - DoIsPermittedCheck(); - - if (m_elevatedHelper != NULL || !AtLeastWinVista()) { - return S_OK; - } - - // https://learn.microsoft.com/en-us/windows/win32/com/the-com-elevation-moniker - HRESULT hr = CoCreateInstanceAsAdmin(GetIEWindowHWND(), CLSID_ElevationHelper, IID_IElevationHelper, (void**)&m_elevatedHelper); - if (!SUCCEEDED(hr)) { - TRACE("RequestElevation() failed: %ls\n", GetMessageForHresult(hr)); - } - return hr; -} - -STDMETHODIMP CLegacyUpdateCtrl::CreateObject(BSTR progID, IDispatch **retval) { - DoIsPermittedCheck(); - - HRESULT hr = S_OK; - CComPtr elevatedHelper; - if (progID == NULL) { - hr = E_INVALIDARG; - goto end; - } - - if (!ProgIDIsPermitted(progID)) { - hr = E_ACCESSDENIED; - goto end; - } - - hr = GetElevatedHelper(elevatedHelper); - if (!SUCCEEDED(hr)) { - goto end; - } - - return elevatedHelper->CreateObject(progID, retval); - -end: - if (!SUCCEEDED(hr)) { - TRACE("CreateObject(%ls) failed: %ls\n", progID, GetMessageForHresult(hr)); - } - return hr; -} - -STDMETHODIMP CLegacyUpdateCtrl::SetBrowserHwnd(IUpdateInstaller *installer) { - DoIsPermittedCheck(); - - if (installer == NULL) { - return E_INVALIDARG; - } - - CComPtr updateInstaller = NULL; - HRESULT hr = installer->QueryInterface(IID_IUpdateInstaller, (void **)&updateInstaller); - if (!SUCCEEDED(hr)) { - return hr; - } - - updateInstaller->put_ParentHwnd(GetIEWindowHWND()); - return S_OK; -} - -STDMETHODIMP CLegacyUpdateCtrl::GetUserType(UserType *retval) { - DoIsPermittedCheck(); - - if (IsUserAdmin()) { - // Entire process is elevated. - *retval = e_admin; - } else if (m_elevatedHelper != NULL) { - // Our control has successfully received elevation. - *retval = e_elevated; - } else { - // The control has no admin rights (although it may not have requested them yet). - *retval = e_nonAdmin; - } - - return S_OK; -} - -STDMETHODIMP CLegacyUpdateCtrl::get_IsRebootRequired(VARIANT_BOOL *retval) { - DoIsPermittedCheck(); - - // Ask WU itself whether a reboot is required - CComPtr systemInfo; - if (SUCCEEDED(systemInfo.CoCreateInstance(CLSID_SystemInformation, NULL, CLSCTX_INPROC_SERVER))) { - if (SUCCEEDED(systemInfo->get_RebootRequired(retval)) && *retval == VARIANT_TRUE) { - return S_OK; - } - } - - // Check reboot flag in registry - HKEY subkey; - HRESULT hr = HRESULT_FROM_WIN32(RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\WindowsUpdate\\Auto Update\\RebootRequired", KEY_WOW64_64KEY, KEY_READ, &subkey)); - if (SUCCEEDED(hr)) { - RegCloseKey(subkey); - *retval = VARIANT_TRUE; - return S_OK; - } - - *retval = VARIANT_FALSE; - return S_OK; -} - -STDMETHODIMP CLegacyUpdateCtrl::get_IsWindowsUpdateDisabled(VARIANT_BOOL *retval) { - DoIsPermittedCheck(); - - // Future note: These are in HKCU on NT; HKLM on 9x. - // Remove links and access to Windows Update - DWORD value; - HRESULT hr = GetRegistryDword(HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer", L"NoWindowsUpdate", KEY_WOW64_64KEY, &value); - if (SUCCEEDED(hr) && value == 1) { - *retval = VARIANT_TRUE; - return S_OK; - } - - // Remove access to use all Windows Update features - hr = GetRegistryDword(HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Policies\\WindowsUpdate", L"DisableWindowsUpdateAccess", KEY_WOW64_64KEY, &value); - if (SUCCEEDED(hr) && value == 1) { - *retval = VARIANT_TRUE; - return S_OK; - } - - *retval = VARIANT_FALSE; - return S_OK; -} - -STDMETHODIMP CLegacyUpdateCtrl::RebootIfRequired(void) { - DoIsPermittedCheck(); - - HRESULT hr = S_OK; - VARIANT_BOOL isRebootRequired; - if (SUCCEEDED(get_IsRebootRequired(&isRebootRequired)) && isRebootRequired == VARIANT_TRUE) { - // Calling Commit() is recommended on Windows 10, to ensure feature updates are properly prepared - // prior to the reboot. If IUpdateInstaller4 doesn't exist, we can skip this. - CComPtr installer; - hr = installer.CoCreateInstance(CLSID_UpdateInstaller, NULL, CLSCTX_INPROC_SERVER); - if (SUCCEEDED(hr) && hr != REGDB_E_CLASSNOTREG) { - hr = installer->Commit(0); - if (!SUCCEEDED(hr)) { - return hr; - } - } - - - CComPtr elevatedHelper; - hr = GetElevatedHelper(elevatedHelper); - if (!SUCCEEDED(hr)) { - return hr; - } - - hr = elevatedHelper->Reboot(); - } - - return hr; -} - -static HRESULT StartLauncher(LPWSTR params, BOOL wait) { - LPWSTR path; - HRESULT hr = GetInstallPath(&path); - if (!SUCCEEDED(hr)) { - return hr; - } - - PathAppend(path, L"LegacyUpdate.exe"); - - DWORD code; - hr = Exec(L"open", path, params, NULL, SW_SHOW, wait, &code); - if (SUCCEEDED(hr)) { - hr = HRESULT_FROM_WIN32(code); - } - - return hr; -} - -STDMETHODIMP CLegacyUpdateCtrl::ViewWindowsUpdateLog(void) { - DoIsPermittedCheck(); - - HRESULT hr = StartLauncher(L"/log", FALSE); - if (!SUCCEEDED(hr)) { - // Try directly - hr = ::ViewWindowsUpdateLog(SW_SHOWDEFAULT); - } - - return hr; -} - -STDMETHODIMP CLegacyUpdateCtrl::OpenWindowsUpdateSettings(void) { - DoIsPermittedCheck(); - - HRESULT hr = StartLauncher(L"/options", FALSE); - if (!SUCCEEDED(hr)) { - TRACE(L"OpenWindowsUpdateSettings() failed, falling back: %ls\n", GetMessageForHresult(hr)); - - // Might happen if the site isn't trusted, and the user rejected the IE medium integrity prompt. - // Use the basic Automatic Updates dialog directly from COM. - CComPtr automaticUpdates; - hr = automaticUpdates.CoCreateInstance(CLSID_AutomaticUpdates, NULL, CLSCTX_INPROC_SERVER); - - if (SUCCEEDED(hr)) { - hr = automaticUpdates->ShowSettingsDialog(); - } - - if (!SUCCEEDED(hr)) { - TRACE(L"OpenWindowsUpdateSettings() failed: %ls\n", GetMessageForHresult(hr)); - } - } - - return hr; -} - -STDMETHODIMP CLegacyUpdateCtrl::get_IsUsingWsusServer(VARIANT_BOOL *retval) { - DoIsPermittedCheck(); - - DWORD useWUServer; - HRESULT hr = GetRegistryDword(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate\\AU", L"UseWUServer", 0, &useWUServer); - *retval = SUCCEEDED(hr) && useWUServer == 1 ? VARIANT_TRUE : VARIANT_FALSE; - return S_OK; -} - -STDMETHODIMP CLegacyUpdateCtrl::get_WsusServerUrl(BSTR *retval) { - DoIsPermittedCheck(); - - LPWSTR data; - DWORD size; - HRESULT hr = GetRegistryString(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate", L"WUServer", 0, &data, &size); - *retval = SUCCEEDED(hr) ? SysAllocStringLen(data, size - 1) : NULL; - if (data) { - LocalFree(data); - } - return S_OK; -} - -STDMETHODIMP CLegacyUpdateCtrl::get_WsusStatusServerUrl(BSTR *retval) { - DoIsPermittedCheck(); - - LPWSTR data; - DWORD size; - HRESULT hr = GetRegistryString(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Policies\\Microsoft\\Windows\\WindowsUpdate", L"WUStatusServer", 0, &data, &size); - *retval = SUCCEEDED(hr) ? SysAllocStringLen(data, size - 1) : NULL; - if (data) { - LocalFree(data); - } - return S_OK; -} diff --git a/LegacyUpdate/LegacyUpdateCtrl.h b/LegacyUpdate/LegacyUpdateCtrl.h deleted file mode 100644 index 34d421d..0000000 --- a/LegacyUpdate/LegacyUpdateCtrl.h +++ /dev/null @@ -1,119 +0,0 @@ -#pragma once - -// LegacyUpdateCtrl.h : Declaration of the CLegacyUpdateCtrl ActiveX Control class. - -// CLegacyUpdateCtrl : See LegacyUpdateCtrl.cpp for implementation. - -#include -#include -#include -#include "resource.h" -#include "LegacyUpdate_i.h" - -// CLegacyUpdateCtrl -class ATL_NO_VTABLE CLegacyUpdateCtrl : - public CComObjectRootEx, - public IDispatchImpl, - public IPersistStreamInitImpl, - public IOleControlImpl, - public IOleObjectImpl, - public IOleInPlaceActiveObjectImpl, - public IViewObjectExImpl, - public IOleInPlaceObjectWindowlessImpl, - public ISupportErrorInfo, - public IObjectWithSiteImpl, - public IPersistStorageImpl, - public IQuickActivateImpl, - public IProvideClassInfo2Impl<&CLSID_LegacyUpdateCtrl, NULL, &LIBID_LegacyUpdateLib>, - public CComCoClass, - public CComControl { -private: - CComPtr m_elevatedHelper; - CComPtr m_nonElevatedHelper; - -public: - CLegacyUpdateCtrl() { - m_bWindowOnly = TRUE; - } - - DECLARE_OLEMISC_STATUS( - OLEMISC_INVISIBLEATRUNTIME | - OLEMISC_ACTIVATEWHENVISIBLE | - OLEMISC_SETCLIENTSITEFIRST | - OLEMISC_INSIDEOUT | - OLEMISC_CANTLINKINSIDE | - OLEMISC_RECOMPOSEONRESIZE - ) - - DECLARE_REGISTRY_RESOURCEID(IDR_LEGACYUPDATECTRL) - - BEGIN_COM_MAP(CLegacyUpdateCtrl) - COM_INTERFACE_ENTRY(ILegacyUpdateCtrl) - COM_INTERFACE_ENTRY(IDispatch) - COM_INTERFACE_ENTRY(IViewObjectEx) - COM_INTERFACE_ENTRY(IViewObject2) - COM_INTERFACE_ENTRY(IViewObject) - COM_INTERFACE_ENTRY(IOleInPlaceObjectWindowless) - COM_INTERFACE_ENTRY(IOleInPlaceObject) - COM_INTERFACE_ENTRY2(IOleWindow, IOleInPlaceObjectWindowless) - COM_INTERFACE_ENTRY(IOleInPlaceActiveObject) - COM_INTERFACE_ENTRY(IOleControl) - COM_INTERFACE_ENTRY(IOleObject) - COM_INTERFACE_ENTRY(IPersistStreamInit) - COM_INTERFACE_ENTRY2(IPersist, IPersistStreamInit) - COM_INTERFACE_ENTRY(ISupportErrorInfo) - COM_INTERFACE_ENTRY(IQuickActivate) - COM_INTERFACE_ENTRY(IPersistStorage) - COM_INTERFACE_ENTRY(IProvideClassInfo) - COM_INTERFACE_ENTRY(IProvideClassInfo2) - END_COM_MAP() - - BEGIN_PROP_MAP(CLegacyUpdateCtrl) - END_PROP_MAP() - - BEGIN_MSG_MAP(CLegacyUpdateCtrl) - CHAIN_MSG_MAP(CComControl) - DEFAULT_REFLECTION_HANDLER() - END_MSG_MAP() - - // ISupportsErrorInfo - STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid) { - return IsEqualGUID(riid, IID_ILegacyUpdateCtrl) ? S_OK : S_FALSE; - } - - // IViewObjectEx - DECLARE_VIEW_STATUS(VIEWSTATUS_SOLIDBKGND | VIEWSTATUS_OPAQUE) - - // ILegacyUpdateCtrl - DECLARE_PROTECT_FINAL_CONSTRUCT() - - HRESULT FinalConstruct() { return S_OK; } - void FinalRelease() {} - -private: - IHTMLDocument2 *GetHTMLDocument(); - HWND GetIEWindowHWND(); - BOOL IsPermitted(); - STDMETHODIMP GetElevatedHelper(CComPtr &retval); - -public: - STDMETHODIMP SetClientSite(IOleClientSite *pClientSite); - - STDMETHODIMP CheckControl(VARIANT_BOOL *retval); - STDMETHODIMP MessageForHresult(LONG inHresult, BSTR *retval); - STDMETHODIMP GetOSVersionInfo(OSVersionField osField, LONG systemMetric, VARIANT *retval); - STDMETHODIMP RequestElevation(); - STDMETHODIMP CreateObject(BSTR progID, IDispatch **retval); - STDMETHODIMP SetBrowserHwnd(IUpdateInstaller *installer); - STDMETHODIMP GetUserType(UserType *retval); - STDMETHODIMP get_IsRebootRequired(VARIANT_BOOL *retval); - STDMETHODIMP get_IsWindowsUpdateDisabled(VARIANT_BOOL *retval); - STDMETHODIMP RebootIfRequired(void); - STDMETHODIMP ViewWindowsUpdateLog(void); - STDMETHODIMP OpenWindowsUpdateSettings(void); - STDMETHODIMP get_IsUsingWsusServer(VARIANT_BOOL *retval); - STDMETHODIMP get_WsusServerUrl(BSTR *retval); - STDMETHODIMP get_WsusStatusServerUrl(BSTR *retval); -}; - -OBJECT_ENTRY_AUTO(__uuidof(LegacyUpdateCtrl), CLegacyUpdateCtrl) diff --git a/LegacyUpdate/LegacyUpdateCtrl.rgs b/LegacyUpdate/LegacyUpdateCtrl.rgs deleted file mode 100644 index 7767067..0000000 --- a/LegacyUpdate/LegacyUpdateCtrl.rgs +++ /dev/null @@ -1,37 +0,0 @@ -HKCR -{ - LegacyUpdate.Control.1 = s 'LegacyUpdateCtrl Class' - { - CLSID = s '{AD28E0DF-5F5A-40B5-9432-85EFD97D1F9F}' - } - LegacyUpdate.Control = s 'LegacyUpdateCtrl Class' - { - CurVer = s 'LegacyUpdate.Control.1' - } - NoRemove CLSID - { - ForceRemove {AD28E0DF-5F5A-40B5-9432-85EFD97D1F9F} = s 'Legacy Update Control' - { - ProgID = s 'LegacyUpdate.Control.1' - VersionIndependentProgID = s 'LegacyUpdate.Control' - ForceRemove 'Programmable' - InprocServer32 = s '%MODULE%' - { - val ThreadingModel = s 'Apartment' - } - val AppID = s '%APPID%' - ForceRemove 'Control' - 'MiscStatus' = s '0' - { - '1' = s '%OLEMISC%' - } - 'TypeLib' = s '{05D22F33-C7C3-4C90-BDD9-CEDC86EA8FBE}' - 'Version' = s '1.0' - 'Implemented Categories' - { - '{7DD95801-9882-11CF-9FA9-00AA006C42C4}' - '{7DD95802-9882-11CF-9FA9-00AA006C42C4}' - } - } - } -} diff --git a/LegacyUpdate/Makefile b/LegacyUpdate/Makefile deleted file mode 100644 index f0fe990..0000000 --- a/LegacyUpdate/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -override DEBUG := $(or $(DEBUG),1) - -MSBUILDCONFIG32 = $(if $(filter 1,$(DEBUG)),Debug-VC08,Release) -MSBUILDCONFIG64 = $(if $(filter 1,$(DEBUG)),Debug-VC17,Release) - -MSBUILDFLAGS = /v:minimal /m - -ifeq ($(CI),1) -ifeq ($(DEBUG),1) - MSBUILDCONFIG32 = Debug-VC17 -endif - MSBUILDFLAGS += /p:PlatformToolset=v141_xp -endif - -MSBUILDFLAGS32 = $(MSBUILDFLAGS) /p:Configuration=$(MSBUILDCONFIG32) /p:Platform=Win32 -MSBUILDFLAGS64 = $(MSBUILDFLAGS) /p:Configuration=$(MSBUILDCONFIG64) /p:Platform=x64 - -VSPATH ?= $(shell wslpath "$(shell '/mnt/c/Program Files (x86)/Microsoft Visual Studio/Installer/vswhere.exe' -latest -property installationPath)") -PATH := $(VSPATH)/MSBuild/Current/Bin:$(PATH) - -MSBUILD = msbuild.exe - -all: - @# Workaround for "dlldatax.obj: LNK2001: unresolved external symbol _LegacyUpdate_ProxyFileInfo" - rm -f LegacyUpdate_p.c - cd ..; $(MSBUILD) $(MSBUILDFLAGS32) LegacyUpdate.sln - rm -f LegacyUpdate_p.c - cd ..; $(MSBUILD) $(MSBUILDFLAGS64) LegacyUpdate.sln - -ifeq ($(SIGN),1) - ../build/sign.sh \ - ../Release/LegacyUpdate.dll \ - ../x64/Release/LegacyUpdate.dll -endif - -clean: - rm -rf \ - Debug-VC08 Debug-VC17 Release x64 \ - LegacyUpdate_i.c LegacyUpdate_i.h LegacyUpdate_p.c LegacyUpdateidl.h - cd ..; $(MSBUILD) $(MSBUILDFLAGS32) LegacyUpdate.sln /t:Clean - cd ..; $(MSBUILD) $(MSBUILDFLAGS64) LegacyUpdate.sln /t:Clean - -.PHONY: all clean diff --git a/LegacyUpdate/ProgressBarControl.cpp b/LegacyUpdate/ProgressBarControl.cpp deleted file mode 100644 index f30757e..0000000 --- a/LegacyUpdate/ProgressBarControl.cpp +++ /dev/null @@ -1,65 +0,0 @@ -// ProgressBarControl.cpp : Implementation of CProgressBarControl -#include "stdafx.h" -#include "ProgressBarControl.h" -#include - -#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") - -#ifndef PBS_MARQUEE -#define PBS_MARQUEE 0x08 -#endif - -#ifndef PBM_SETMARQUEE -#define PBM_SETMARQUEE (WM_USER + 10) -#endif - -LRESULT CProgressBarControl::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) { - RECT rc; - GetWindowRect(&rc); - rc.right -= rc.left; - rc.bottom -= rc.top; - rc.left = 0; - rc.top = 0; - m_ctl.Create(m_hWnd, rc, PROGRESS_CLASS, WS_CHILD | WS_VISIBLE, WS_EX_CLIENTEDGE); - put_Value(-1); - return 0; -} - -STDMETHODIMP CProgressBarControl::SetObjectRects(LPCRECT prcPos, LPCRECT prcClip) { - IOleInPlaceObjectWindowlessImpl::SetObjectRects(prcPos, prcClip); - ::SetWindowPos(m_ctl.m_hWnd, NULL, 0, 0, - prcPos->right - prcPos->left, - prcPos->bottom - prcPos->top, - SWP_NOZORDER | SWP_NOACTIVATE); - return S_OK; -} - -STDMETHODIMP CProgressBarControl::get_Value(SHORT *pValue) { - if (m_ctl.GetWindowLongPtr(GWL_STYLE) & PBS_MARQUEE) { - // Marquee - no value - *pValue = -1; - } else { - // Normal - return PBM_GETPOS - *pValue = (SHORT)m_ctl.SendMessage(PBM_GETPOS, 0, 0); - } - return S_OK; -} - -STDMETHODIMP CProgressBarControl::put_Value(SHORT value) { - if (value == -1) { - // Marquee style - m_ctl.SetWindowLongPtr(GWL_STYLE, m_ctl.GetWindowLongPtr(GWL_STYLE) | PBS_MARQUEE); - m_ctl.SendMessage(PBM_SETMARQUEE, TRUE, 100); - } else { - // Normal style - SHORT oldValue; - get_Value(&oldValue); - if (oldValue == -1) { - m_ctl.SetWindowLongPtr(GWL_STYLE, m_ctl.GetWindowLongPtr(GWL_STYLE) & ~PBS_MARQUEE); - m_ctl.SendMessage(PBM_SETRANGE, 0, MAKELPARAM(0, 100)); - } - - m_ctl.SendMessage(PBM_SETPOS, value, 0); - } - return S_OK; -} diff --git a/LegacyUpdate/ProgressBarControl.h b/LegacyUpdate/ProgressBarControl.h deleted file mode 100644 index 648e3e1..0000000 --- a/LegacyUpdate/ProgressBarControl.h +++ /dev/null @@ -1,77 +0,0 @@ -#pragma once - -// ProgressBarControl.h : Declaration of the CProgressBarControl class. - -#include -#include "resource.h" -#include "LegacyUpdate_i.h" - -// CProgressBarControl -class ATL_NO_VTABLE CProgressBarControl : - public CComObjectRootEx, - public IDispatchImpl, - public IOleControlImpl, - public IOleObjectImpl, - public IOleInPlaceActiveObjectImpl, - public IViewObjectExImpl, - public IOleInPlaceObjectWindowlessImpl, - public CComCoClass, - public CComControl -{ -public: - CContainedWindow m_ctl; - - CProgressBarControl() : m_ctl(L"msctls_progress32", this, 1) { - m_bWindowOnly = TRUE; - } - - DECLARE_OLEMISC_STATUS( - OLEMISC_RECOMPOSEONRESIZE | - OLEMISC_CANTLINKINSIDE | - OLEMISC_INSIDEOUT | - OLEMISC_ACTIVATEWHENVISIBLE | - OLEMISC_SETCLIENTSITEFIRST - ) - - DECLARE_REGISTRY_RESOURCEID(IDR_PROGRESSBARCONTROL) - - BEGIN_COM_MAP(CProgressBarControl) - COM_INTERFACE_ENTRY(IProgressBarControl) - COM_INTERFACE_ENTRY(IDispatch) - COM_INTERFACE_ENTRY(IViewObjectEx) - COM_INTERFACE_ENTRY(IViewObject2) - COM_INTERFACE_ENTRY(IViewObject) - COM_INTERFACE_ENTRY(IOleInPlaceObjectWindowless) - COM_INTERFACE_ENTRY(IOleInPlaceObject) - COM_INTERFACE_ENTRY2(IOleWindow, IOleInPlaceObjectWindowless) - COM_INTERFACE_ENTRY(IOleInPlaceActiveObject) - COM_INTERFACE_ENTRY(IOleControl) - COM_INTERFACE_ENTRY(IOleObject) - END_COM_MAP() - - BEGIN_PROP_MAP(CProgressBarControl) - END_PROP_MAP() - - BEGIN_MSG_MAP(CProgressBarControl) - MESSAGE_HANDLER(WM_CREATE, OnCreate) - CHAIN_MSG_MAP(CComControl) - ALT_MSG_MAP(1) - END_MSG_MAP() - - // IViewObjectEx - DECLARE_VIEW_STATUS(VIEWSTATUS_SOLIDBKGND | VIEWSTATUS_OPAQUE) - - // IProgressBarControl - DECLARE_PROTECT_FINAL_CONSTRUCT() - - HRESULT FinalConstruct() { return S_OK; } - void FinalRelease() {} - - LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); - STDMETHODIMP SetObjectRects(LPCRECT prcPos, LPCRECT prcClip); - - STDMETHODIMP get_Value(SHORT *pValue); - STDMETHODIMP put_Value(SHORT value); -}; - -OBJECT_ENTRY_AUTO(__uuidof(ProgressBarControl), CProgressBarControl) diff --git a/LegacyUpdate/ProgressBarControl.html b/LegacyUpdate/ProgressBarControl.html deleted file mode 100644 index 0d592ee..0000000 --- a/LegacyUpdate/ProgressBarControl.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - ATL test page for object ProgressBarControl - - - - -
- -
- -
-1
- - - - - - - - diff --git a/LegacyUpdate/ProgressBarControl.rgs b/LegacyUpdate/ProgressBarControl.rgs deleted file mode 100644 index 3cc0a33..0000000 --- a/LegacyUpdate/ProgressBarControl.rgs +++ /dev/null @@ -1,34 +0,0 @@ -HKCR -{ - LegacyUpdate.ProgressBar.1 = s 'ProgressBarControl Class' - { - CLSID = s '{7B875A2F-2DFB-4D38-91F5-5C0BFB74C377}' - } - LegacyUpdate.ProgressBar = s 'ProgressBarControl Class' - { - CurVer = s 'LegacyUpdate.ProgressBar.1' - } - NoRemove CLSID - { - ForceRemove {7B875A2F-2DFB-4D38-91F5-5C0BFB74C377} = s 'Legacy Update Progress Bar Control' - { - ForceRemove Programmable - InprocServer32 = s '%MODULE%' - { - val ThreadingModel = s 'Apartment' - } - ForceRemove Control - MiscStatus = s '0' - { - '1' = s '%OLEMISC%' - } - TypeLib = s '{05D22F33-C7C3-4C90-BDD9-CEDC86EA8FBE}' - Version = s '1.0' - 'Implemented Categories' - { - '{7DD95801-9882-11CF-9FA9-00AA006C42C4}' - '{7DD95802-9882-11CF-9FA9-00AA006C42C4}' - } - } - } -} diff --git a/LegacyUpdate/Resource.h b/LegacyUpdate/Resource.h deleted file mode 100644 index 913bcb1..0000000 --- a/LegacyUpdate/Resource.h +++ /dev/null @@ -1,20 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by LegacyUpdate.rc -// -#define IDS_LEGACYUPDATE 1 -#define IDR_LEGACYUPDATEOCX 101 -#define IDR_LEGACYUPDATECTRL 102 -#define IDR_PROGRESSBARCONTROL 103 -#define IDR_ELEVATIONHELPER 104 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 204 -#define _APS_NEXT_COMMAND_VALUE 32768 -#define _APS_NEXT_CONTROL_VALUE 201 -#define _APS_NEXT_SYMED_VALUE 105 -#endif -#endif diff --git a/LegacyUpdate/Utils.cpp b/LegacyUpdate/Utils.cpp deleted file mode 100644 index fb9629d..0000000 --- a/LegacyUpdate/Utils.cpp +++ /dev/null @@ -1,167 +0,0 @@ -#include "stdafx.h" -#include -#include -#include -#include "HResult.h" -#include "WMI.h" -#include "VersionInfo.h" - -#pragma comment(lib, "advapi32.lib") -#pragma comment(lib, "shlwapi.lib") -#pragma comment(lib, "version.lib") - -typedef DWORD (WINAPI *_InitiateShutdownW)(LPWSTR lpMachineName, LPWSTR lpMessage, DWORD dwGracePeriod, DWORD dwShutdownFlags, DWORD dwReason); - -static BOOL _loadedProductName = FALSE; -static CComVariant _productName; - -typedef struct { - DWORD version; - DWORD osFlag; - LPWSTR library; - UINT stringIDs[3]; -} WinNT5Variant; - -static const WinNT5Variant nt5Variants[] = { - // XP - {0x0501, OS_TABLETPC, L"winbrand.dll", { 180, 2000}}, - {0x0501, OS_MEDIACENTER, L"winbrand.dll", { 180, 2001}}, - {0x0501, OS_STARTER, L"winbrand.dll", { 180, 2002}}, - {0x0501, OS_EMBPOS, L"winbrand.dll", { 180, 2003}}, - {0x0501, OS_WINFLP, L"winbrand.dll", { 180, 2004}}, - {0x0501, OS_EMBSTD2009, L"winbrand.dll", { 180, 2005}}, - {0x0501, OS_EMBPOS2009, L"winbrand.dll", { 180, 2006}}, - // Check for XP Embedded last as WES2009 also identifies as OS_EMBEDDED. - {0x0501, OS_EMBEDDED, L"sysdm.cpl", { 180, 189}}, - - // Server 2003 - {0x0502, OS_APPLIANCE, L"winbrand.dll", { 181, 2002}}, - {0x0502, OS_STORAGESERVER, L"wssbrand.dll", {1101, 1102}}, - {0x0502, OS_COMPUTECLUSTER, L"hpcbrand.dll", {1101, 1102, 1103}}, - {0x0502, OS_HOMESERVER, L"whsbrand.dll", {1101, 1102}}, -}; - -HRESULT GetOSProductName(LPVARIANT productName) { - if (!_loadedProductName) { - _loadedProductName = TRUE; - VariantInit(&_productName); - - // Handle the absolute disaster of Windows XP/Server 2003 edition branding - WORD winver = GetWinVer(); - if (HIBYTE(winver) == 5) { - WinNT5Variant variant = {}; - for (DWORD i = 0; i < ARRAYSIZE(nt5Variants); i++) { - if (winver == nt5Variants[i].version && IsOS(nt5Variants[i].osFlag)) { - variant = nt5Variants[i]; - break; - } - } - - if (variant.version) { - HMODULE brandDll = LoadLibraryEx(variant.library, NULL, LOAD_LIBRARY_AS_DATAFILE); - if (brandDll) { - WCHAR brandStr[1024]; - ZeroMemory(brandStr, ARRAYSIZE(brandStr)); - - DWORD j = 0; - while (variant.stringIDs[j] != 0) { - UINT id = variant.stringIDs[j]; - WCHAR str[340]; - if (id == 180 || id == 181) { - // Get "Microsoft Windows XP" or "Microsoft Windows Server 2003" string - HMODULE sysdm = LoadLibraryEx(L"sysdm.cpl", NULL, LOAD_LIBRARY_AS_DATAFILE); - if (sysdm) { - LoadString(sysdm, id, str, ARRAYSIZE(str)); - FreeLibrary(sysdm); - } - } else { - LoadString(brandDll, id, str, ARRAYSIZE(str)); - } - - if (j > 0) { - wcscat(brandStr, L" "); - } - - wcscat(brandStr, str); - j++; - } - - _productName.vt = VT_BSTR; - _productName.bstrVal = SysAllocString(brandStr); - FreeLibrary(brandDll); - } - } - } - - if (_productName.vt == VT_EMPTY) { - // Get from WMI - HRESULT hr = QueryWMIProperty(L"SELECT Caption FROM Win32_OperatingSystem", L"Caption", &_productName); - if (!SUCCEEDED(hr)) { - return hr; - } - } - } - - VariantCopy(productName, &_productName); - return S_OK; -} - -HRESULT Reboot() { - HRESULT hr = E_FAIL; - - // Make sure we have permission to shut down - HANDLE token; - if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &token)) { - hr = AtlHresultFromLastError(); - TRACE("OpenProcessToken() failed: %ls\n", GetMessageForHresult(hr)); - goto end; - } - - LUID shutdownLuid; - if (!LookupPrivilegeValue(NULL, SE_SHUTDOWN_NAME, &shutdownLuid)) { - hr = AtlHresultFromLastError(); - TRACE("LookupPrivilegeValue() failed: %ls\n", GetMessageForHresult(hr)); - goto end; - } - - // Ask the system nicely to give us shutdown privilege - TOKEN_PRIVILEGES privileges; - privileges.PrivilegeCount = 1; - privileges.Privileges[0].Luid = shutdownLuid; - privileges.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; - if (!AdjustTokenPrivileges(token, FALSE, &privileges, 0, NULL, NULL)) { - hr = AtlHresultFromLastError(); - TRACE("AdjustTokenPrivileges() failed: %ls\n", GetMessageForHresult(hr)); - goto end; - } - - // Reboot with reason "Operating System: Security fix (Unplanned)", ensuring to install updates. - // Try InitiateShutdown first (Vista+) - _InitiateShutdownW $InitiateShutdownW = (_InitiateShutdownW)GetProcAddress(GetModuleHandle(L"advapi32.dll"), "InitiateShutdownW"); - if ($InitiateShutdownW) { - hr = HRESULT_FROM_WIN32($InitiateShutdownW(NULL, NULL, 0, SHUTDOWN_RESTART | SHUTDOWN_INSTALL_UPDATES, SHTDN_REASON_MAJOR_OPERATINGSYSTEM | SHTDN_REASON_MINOR_SECURITYFIX)); - } - - // Try InitiateSystemShutdownEx (2k/XP) - if (!SUCCEEDED(hr)) { - TRACE("InitiateShutdown() failed: %ls\n", GetMessageForHresult(hr)); - - if (InitiateSystemShutdownEx(NULL, NULL, 0, FALSE, TRUE, SHTDN_REASON_MAJOR_OPERATINGSYSTEM | SHTDN_REASON_MINOR_SECURITYFIX) == 0) { - hr = AtlHresultFromLastError(); - TRACE("InitiateSystemShutdownExW() failed: %ls\n", GetMessageForHresult(hr)); - } - } - - // Last-ditch attempt ExitWindowsEx (only guaranteed to work for the current logged in user) - if (!ExitWindowsEx(EWX_REBOOT | EWX_FORCEIFHUNG, SHTDN_REASON_MAJOR_OPERATINGSYSTEM | SHTDN_REASON_MINOR_SECURITYFIX)) { - hr = AtlHresultFromLastError(); - TRACE("ExitWindowsEx() failed: %ls\n", GetMessageForHresult(hr)); - } - -end: - if (token) { - CloseHandle(token); - } - - return hr; -} diff --git a/LegacyUpdate/Utils.h b/LegacyUpdate/Utils.h deleted file mode 100644 index 8bb63c7..0000000 --- a/LegacyUpdate/Utils.h +++ /dev/null @@ -1,5 +0,0 @@ -#pragma once - -HRESULT GetOSProductName(LPVARIANT productName); - -HRESULT Reboot(); diff --git a/LegacyUpdate/build.cmd b/LegacyUpdate/build.cmd deleted file mode 100644 index 98c7f91..0000000 --- a/LegacyUpdate/build.cmd +++ /dev/null @@ -1,17 +0,0 @@ -@echo off -setlocal enabledelayedexpansion -cd %~dp0\.. - -:: Clean -call build\getvc.cmd x86 -msbuild LegacyUpdate.sln /v:quiet /m /p:Configuration=Release /p:Platform=Win32 /t:clean -if "%errorlevel%" neq "0" exit /b %errorlevel% -msbuild LegacyUpdate.sln /v:quiet /m /p:Configuration=Release /p:Platform=x64 /t:clean -if "%errorlevel%" neq "0" exit /b %errorlevel% - -:: Build DLL -msbuild LegacyUpdate.sln /v:minimal /m /p:Configuration=Release /p:Platform=Win32 %* -if "%errorlevel%" neq "0" exit /b %errorlevel% -call build\getvc.cmd x64 -msbuild LegacyUpdate.sln /v:minimal /m /p:Configuration=Release /p:Platform=x64 %* -if "%errorlevel%" neq "0" exit /b %errorlevel% diff --git a/LegacyUpdate/dlldata.c b/LegacyUpdate/dlldata.c deleted file mode 100644 index b94a58a..0000000 --- a/LegacyUpdate/dlldata.c +++ /dev/null @@ -1,38 +0,0 @@ -/********************************************************* - DllData file -- generated by MIDL compiler - - DO NOT ALTER THIS FILE - - This file is regenerated by MIDL on every IDL file compile. - - To completely reconstruct this file, delete it and rerun MIDL - on all the IDL files in this DLL, specifying this file for the - /dlldata command line option - -*********************************************************/ - -#define PROXY_DELEGATION - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -EXTERN_PROXY_FILE( LegacyUpdate ) - - -PROXYFILE_LIST_START -/* Start of list */ - REFERENCE_PROXY_FILE( LegacyUpdate ), -/* End of list */ -PROXYFILE_LIST_END - - -DLLDATA_ROUTINES( aProxyFileList, GET_DLL_CLSID ) - -#ifdef __cplusplus -} /*extern "C" */ -#endif - -/* end of generated dlldata file */ diff --git a/LegacyUpdate/dlldatax.c b/LegacyUpdate/dlldatax.c deleted file mode 100644 index 3c4a30d..0000000 --- a/LegacyUpdate/dlldatax.c +++ /dev/null @@ -1,18 +0,0 @@ -// wrapper for dlldata.c - -#ifdef _MERGE_PROXYSTUB // merge proxy stub DLL - -#define REGISTER_PROXY_DLL //DllRegisterServer, etc. - -#define _WIN32_WINNT _WIN32_WINNT_WIN2K //for WinNT 4.0 or Win95 with DCOM -#define USE_STUBLESS_PROXY //defined only with MIDL switch /Oicf - -#pragma comment(lib, "rpcns4.lib") -#pragma comment(lib, "rpcrt4.lib") - -#define ENTRY_PREFIX Prx - -#include "dlldata.c" -#include "LegacyUpdate_p.c" - -#endif //_MERGE_PROXYSTUB diff --git a/LegacyUpdate/dlldatax.h b/LegacyUpdate/dlldatax.h deleted file mode 100644 index e5375bb..0000000 --- a/LegacyUpdate/dlldatax.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -#ifdef _MERGE_PROXYSTUB -extern "C" { - BOOL WINAPI PrxDllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved); - STDAPI PrxDllCanUnloadNow(void); - STDAPI PrxDllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv); - STDAPI PrxDllRegisterServer(void); - STDAPI PrxDllUnregisterServer(void); -} -#endif diff --git a/LegacyUpdate/dllmain.cpp b/LegacyUpdate/dllmain.cpp deleted file mode 100644 index 9e32cdc..0000000 --- a/LegacyUpdate/dllmain.cpp +++ /dev/null @@ -1,144 +0,0 @@ -// dllmain.cpp : Implementation of DLL Exports. - -#include "stdafx.h" -#include "LegacyUpdate_i.h" -#include "dllmain.h" - -#include - -#include "dlldatax.h" -#include "Registry.h" -#include "LegacyUpdate.h" - -CLegacyUpdateModule _AtlModule; -HINSTANCE g_hInstance; - -// DLL Entry Point -extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) { -#ifdef _MERGE_PROXYSTUB - if (!PrxDllMain(hInstance, dwReason, lpReserved)) - return FALSE; -#endif - - switch (dwReason) { - case DLL_PROCESS_ATTACH: - g_hInstance = hInstance; - break; - - case DLL_PROCESS_DETACH: - g_hInstance = NULL; - break; - } - - return _AtlModule.DllMain(dwReason, lpReserved); -} - - -// Used to determine whether the DLL can be unloaded by OLE -STDAPI DllCanUnloadNow(void) { -#ifdef _MERGE_PROXYSTUB - HRESULT hr = PrxDllCanUnloadNow(); - if (hr != S_OK) { - return hr; - } -#endif - return _AtlModule.DllCanUnloadNow(); -} - - -// Returns a class factory to create an object of the requested type -STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) { -#ifdef _MERGE_PROXYSTUB - if (PrxDllGetClassObject(rclsid, riid, ppv) == S_OK) { - return S_OK; - } -#endif - return _AtlModule.DllGetClassObject(rclsid, riid, ppv); -} - - -// DllRegisterServer - Adds entries to the system registry -STDAPI DllRegisterServer(void) { - // registers object, typelib and all interfaces in typelib - HRESULT hr = _AtlModule.DllRegisterServer(); - if (!SUCCEEDED(hr)) { - return hr; - } - - // Fix the icon path - HKEY subkey; - hr = HRESULT_FROM_WIN32(RegOpenKeyEx(HKEY_CLASSES_ROOT, L"CLSID\\{84F517AD-6438-478F-BEA8-F0B808DC257F}\\Elevation", 0, KEY_WRITE, &subkey)); - if (!SUCCEEDED(hr)) { - return hr; - } - - LPWSTR installPath; - hr = GetInstallPath(&installPath); - if (!SUCCEEDED(hr)) { - return hr; - } - - WCHAR iconRef[512]; - hr = StringCchPrintf((LPWSTR)&iconRef, ARRAYSIZE(iconRef), L"@%ls\\LegacyUpdate.exe,-100", installPath); - LocalFree(installPath); - if (!SUCCEEDED(hr)) { - return hr; - } - - hr = HRESULT_FROM_WIN32(RegSetValueEx(subkey, L"IconReference", 0, REG_SZ, (LPBYTE)iconRef, (DWORD)(lstrlen(iconRef) + 1) * sizeof(TCHAR))); - if (!SUCCEEDED(hr)) { - return hr; - } - - hr = RegCloseKey(subkey); - -#ifdef _MERGE_PROXYSTUB - if (!SUCCEEDED(hr)) { - return hr; - } - - hr = PrxDllRegisterServer(); -#endif - return hr; -} - - -// DllUnregisterServer - Removes entries from the system registry -STDAPI DllUnregisterServer(void) { - HRESULT hr = _AtlModule.DllUnregisterServer(); -#ifdef _MERGE_PROXYSTUB - if (FAILED(hr)) { - return hr; - } - hr = PrxDllRegisterServer(); - if (FAILED(hr)) { - return hr; - } - hr = PrxDllUnregisterServer(); -#endif - return hr; -} - - -// DllInstall - Adds/Removes entries to the system registry per user per machine. -STDAPI DllInstall(BOOL bInstall, LPCWSTR pszCmdLine) { - HRESULT hr = E_FAIL; - static const wchar_t szUserSwitch[] = L"user"; - - if (pszCmdLine != NULL) { - if (_wcsnicmp(pszCmdLine, szUserSwitch, _countof(szUserSwitch)) == 0) { - AtlSetPerUserRegistration(true); - } - } - - if (bInstall) { - hr = DllRegisterServer(); - if (FAILED(hr)) { - DllUnregisterServer(); - } - } else { - hr = DllUnregisterServer(); - } - - return hr; -} diff --git a/LegacyUpdate/dllmain.h b/LegacyUpdate/dllmain.h deleted file mode 100644 index da9103c..0000000 --- a/LegacyUpdate/dllmain.h +++ /dev/null @@ -1,10 +0,0 @@ -// dllmain.h : Declaration of module class. - -class CLegacyUpdateModule : public CAtlDllModuleT { -public: - DECLARE_LIBID(LIBID_LegacyUpdateLib) - DECLARE_REGISTRY_APPID_RESOURCEID(IDR_LEGACYUPDATEOCX, "{D0A82CD0-B6F0-4101-83ED-DA47D0D04830}") -}; - -extern class CLegacyUpdateModule _AtlModule; -extern HINSTANCE g_hInstance; diff --git a/LegacyUpdate/stdafx.cpp b/LegacyUpdate/stdafx.cpp deleted file mode 100644 index 1edc2c9..0000000 --- a/LegacyUpdate/stdafx.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes -// LegacyUpdate.pch will be the pre-compiled header -// stdafx.obj will contain the pre-compiled type information - -#include "stdafx.h" diff --git a/LegacyUpdate/stdafx.h b/LegacyUpdate/stdafx.h deleted file mode 100644 index f26d852..0000000 --- a/LegacyUpdate/stdafx.h +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once - -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, -// but are changed infrequently - -#ifndef STRICT -#define STRICT -#endif - -#include "targetver.h" - -#define _ATL_APARTMENT_THREADED -#define _ATL_NO_AUTOMATIC_NAMESPACE - -#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit - -#define ISOLATION_AWARE_ENABLED 1 // Enable comctl 6.0 (visual styles) - -#include "resource.h" -#include -#include -#include -#include - -using namespace ATL; - -#define TRACE ATLTRACE diff --git a/LegacyUpdate/targetver.h b/LegacyUpdate/targetver.h deleted file mode 100644 index bb1ce9f..0000000 --- a/LegacyUpdate/targetver.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -#if _MSC_VER > 1599 - // VC17: Windows XP - #define WINVER _WIN32_WINNT_WINXP - #define _WIN32_WINNT _WIN32_WINNT_WINXP -#else - // VC08: Windows 2000 RTM - #define WINVER _WIN32_WINNT_WIN2K - #define _WIN32_WINNT _WIN32_WINNT_WIN2K -#endif diff --git a/LegacyUpdate/wuapi.idl b/LegacyUpdate/wuapi.idl deleted file mode 100644 index 0b8f894..0000000 --- a/LegacyUpdate/wuapi.idl +++ /dev/null @@ -1,39 +0,0 @@ -import "oaidl.idl"; - -// Just types we need from wuapi.idl - -[ - helpstring("IUpdateInstaller Interface"), - object, - oleautomation, - dual, - nonextensible, - uuid(7b929c68-ccdc-4226-96b1-8724600b54c2), - pointer_default(unique), -] -interface IUpdateInstaller : IDispatch { - [id(0x60020003), propget, restricted] - HRESULT ParentHwnd([out, retval] HWND *retval); - - [id(0x60020003), propput, restricted] - HRESULT ParentHwnd([in, unique] HWND value); -}; - -[ - uuid(B596CC9F-56E5-419E-A622-E01BB457431E), - version(2.0), - helpstring("WUAPI 2.0 Type Library") -] -library WUApiLib -{ - importlib("stdole2.tlb"); - - [ - helpstring("UpdateInstaller Class"), - uuid(D2E0FE7F-D23E-48E1-93C0-6FA8CC346474) - ] - coclass UpdateInstaller - { - [default] interface IUpdateInstaller2; - }; -}; diff --git a/LegacyUpdate/wuerror.mc b/LegacyUpdate/wuerror.mc deleted file mode 100644 index 347916b..0000000 --- a/LegacyUpdate/wuerror.mc +++ /dev/null @@ -1,3943 +0,0 @@ -;// Reverse engineered from wuerror.h from Windows SDK 10.0.26100.0 - -;/*************************************************************************** -;* * -;* wuerror.mc -- error code definitions for Windows Update. * -;* * -;* Copyright (c) Microsoft Corporation. All rights reserved. * -;* * -;***************************************************************************/ -;#ifndef _WUERROR_ -;#define _WUERROR_ - -MessageIdTypedef = DWORD -OutputBase = 16 - -FacilityNames = ( - WindowsUpdate = 0x024 -) - -SeverityNames = ( - Success = 0x0 - Error = 0x2 -) - -LanguageNames = ( - English = 0x0409:MSG0409 -) - -;/////////////////////////////////////////////////////////////////////////////// -;// Windows Update Success Codes -;/////////////////////////////////////////////////////////////////////////////// -MessageId = 0x0001 -Facility = WindowsUpdate -Severity = Success -SymbolicName = WU_S_SERVICE_STOP -Language = English -Windows Update Agent was stopped successfully. -. - -MessageId = 0x0002 -Facility = WindowsUpdate -Severity = Success -SymbolicName = WU_S_SELFUPDATE -Language = English -Windows Update Agent updated itself. -. - -MessageId = 0x0003 -Facility = WindowsUpdate -Severity = Success -SymbolicName = WU_S_UPDATE_ERROR -Language = English -Operation completed successfully but there were errors applying the updates. -. - -MessageId = 0x0004 -Facility = WindowsUpdate -Severity = Success -SymbolicName = WU_S_MARKED_FOR_DISCONNECT -Language = English -A callback was marked to be disconnected later because the request to disconnect the operation came while a callback was executing. -. - -MessageId = 0x0005 -Facility = WindowsUpdate -Severity = Success -SymbolicName = WU_S_REBOOT_REQUIRED -Language = English -The system must be restarted to complete installation of the update. -. - -MessageId = 0x0006 -Facility = WindowsUpdate -Severity = Success -SymbolicName = WU_S_ALREADY_INSTALLED -Language = English -The update to be installed is already installed on the system. -. - -MessageId = 0x0007 -Facility = WindowsUpdate -Severity = Success -SymbolicName = WU_S_ALREADY_UNINSTALLED -Language = English -The update to be removed is not installed on the system. -. - -MessageId = 0x0008 -Facility = WindowsUpdate -Severity = Success -SymbolicName = WU_S_ALREADY_DOWNLOADED -Language = English -The update to be downloaded has already been downloaded. -. - -MessageId = 0x0009 -Facility = WindowsUpdate -Severity = Success -SymbolicName = WU_S_SOME_UPDATES_SKIPPED_ON_BATTERY -Language = English -The operation completed successfully, but some updates were skipped because the system is running on batteries. -. - -MessageId = 0x000A -Facility = WindowsUpdate -Severity = Success -SymbolicName = WU_S_ALREADY_REVERTED -Language = English -The update to be reverted is not present on the system. -. - -MessageId = 0x0010 -Facility = WindowsUpdate -Severity = Success -SymbolicName = WU_S_SEARCH_CRITERIA_NOT_SUPPORTED -Language = English -The operation is skipped because the update service does not support the requested search criteria. -. - -MessageId = 0x2015 -Facility = WindowsUpdate -Severity = Success -SymbolicName = WU_S_UH_INSTALLSTILLPENDING -Language = English -The installation operation for the update is still in progress. -. - -MessageId = 0x2016 -Facility = WindowsUpdate -Severity = Success -SymbolicName = WU_S_UH_DOWNLOAD_SIZE_CALCULATED -Language = English -The actual download size has been calculated by the handler. -. - -MessageId = 0x5001 -Facility = WindowsUpdate -Severity = Success -SymbolicName = WU_S_SIH_NOOP -Language = English -No operation was required by the server-initiated healing server response. -. - -MessageId = 0x6001 -Facility = WindowsUpdate -Severity = Success -SymbolicName = WU_S_DM_ALREADYDOWNLOADING -Language = English -The update to be downloaded is already being downloaded. -. - -MessageId = 0x7101 -Facility = WindowsUpdate -Severity = Success -SymbolicName = WU_S_METADATA_SKIPPED_BY_ENFORCEMENTMODE -Language = English -Metadata verification was skipped by enforcement mode. -. - -MessageId = 0x7102 -Facility = WindowsUpdate -Severity = Success -SymbolicName = WU_S_METADATA_IGNORED_SIGNATURE_VERIFICATION -Language = English -A server configuration refresh resulted in metadata signature verification to be ignored. -. - -MessageId = 0x8001 -Facility = WindowsUpdate -Severity = Success -SymbolicName = WU_S_SEARCH_LOAD_SHEDDING -Language = English -Search operation completed successfully but one or more services were shedding load. -. - -MessageId = 0x8002 -Facility = WindowsUpdate -Severity = Success -SymbolicName = WU_S_AAD_DEVICE_TICKET_NOT_NEEDED -Language = English -There was no need to retrieve an AAD device ticket. -. - -;/////////////////////////////////////////////////////////////////////////////// -;// Windows Update Error Codes -;/////////////////////////////////////////////////////////////////////////////// -MessageId = 0x0001 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_NO_SERVICE -Language = English -Windows Update Agent was unable to provide the service. -. - -MessageId = 0x0002 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_MAX_CAPACITY_REACHED -Language = English -The maximum capacity of the service was exceeded. -. - -MessageId = 0x0003 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UNKNOWN_ID -Language = English -An ID cannot be found. -. - -MessageId = 0x0004 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_NOT_INITIALIZED -Language = English -The object could not be initialized. -. - -MessageId = 0x0005 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_RANGEOVERLAP -Language = English -The update handler requested a byte range overlapping a previously requested range. -. - -MessageId = 0x0006 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_TOOMANYRANGES -Language = English -The requested number of byte ranges exceeds the maximum number (2^31 - 1). -. - -MessageId = 0x0007 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INVALIDINDEX -Language = English -The index to a collection was invalid. -. - -MessageId = 0x0008 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_ITEMNOTFOUND -Language = English -The key for the item queried could not be found. -. - -MessageId = 0x0009 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_OPERATIONINPROGRESS -Language = English -Another conflicting operation was in progress. Some operations such as installation cannot be performed twice simultaneously. -. - -MessageId = 0x000A -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_COULDNOTCANCEL -Language = English -Cancellation of the operation was not allowed. -. - -MessageId = 0x000B -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_CALL_CANCELLED -Language = English -Operation was cancelled. -. - -MessageId = 0x000C -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_NOOP -Language = English -No operation was required. -. - -MessageId = 0x000D -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_XML_MISSINGDATA -Language = English -Windows Update Agent could not find required information in the update's XML data. -. - -MessageId = 0x000E -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_XML_INVALID -Language = English -Windows Update Agent found invalid information in the update's XML data. -. - -MessageId = 0x000F -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_CYCLE_DETECTED -Language = English -Circular update relationships were detected in the metadata. -. - -MessageId = 0x0010 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_TOO_DEEP_RELATION -Language = English -Update relationships too deep to evaluate were evaluated. -. - -MessageId = 0x0011 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INVALID_RELATIONSHIP -Language = English -An invalid update relationship was detected. -. - -MessageId = 0x0012 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_REG_VALUE_INVALID -Language = English -An invalid registry value was read. -. - -MessageId = 0x0013 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DUPLICATE_ITEM -Language = English -Operation tried to add a duplicate item to a list. -. - -MessageId = 0x0014 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INVALID_INSTALL_REQUESTED -Language = English -Updates requested for install are not installable by caller. -. - -MessageId = 0x0016 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INSTALL_NOT_ALLOWED -Language = English -Operation tried to install while another installation was in progress or the system was pending a mandatory restart. -. - -MessageId = 0x0017 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_NOT_APPLICABLE -Language = English -Operation was not performed because there are no applicable updates. -. - -MessageId = 0x0018 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_NO_USERTOKEN -Language = English -Operation failed because a required user token is missing. -. - -MessageId = 0x0019 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_EXCLUSIVE_INSTALL_CONFLICT -Language = English -An exclusive update cannot be installed with other updates at the same time. -. - -MessageId = 0x001A -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_POLICY_NOT_SET -Language = English -A policy value was not set. -. - -MessageId = 0x001B -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SELFUPDATE_IN_PROGRESS -Language = English -The operation could not be performed because the Windows Update Agent is self-updating. -. - -MessageId = 0x001D -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INVALID_UPDATE -Language = English -An update contains invalid metadata. -. - -MessageId = 0x001E -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SERVICE_STOP -Language = English -Operation did not complete because the service or system was being shut down. -. - -MessageId = 0x001F -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_NO_CONNECTION -Language = English -Operation did not complete because the network connection was unavailable. -. - -MessageId = 0x0020 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_NO_INTERACTIVE_USER -Language = English -Operation did not complete because there is no logged-on interactive user. -. - -MessageId = 0x0021 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_TIME_OUT -Language = English -Operation did not complete because it timed out. -. - -MessageId = 0x0022 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_ALL_UPDATES_FAILED -Language = English -Operation failed for all the updates. -. - -MessageId = 0x0023 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_EULAS_DECLINED -Language = English -The license terms for all updates were declined. -. - -MessageId = 0x0024 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_NO_UPDATE -Language = English -There are no updates. -. - -MessageId = 0x0025 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_USER_ACCESS_DISABLED -Language = English -Group Policy settings prevented access to Windows Update. -. - -MessageId = 0x0026 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INVALID_UPDATE_TYPE -Language = English -The type of update is invalid. -. - -MessageId = 0x0027 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_URL_TOO_LONG -Language = English -The URL exceeded the maximum length. -. - -MessageId = 0x0028 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UNINSTALL_NOT_ALLOWED -Language = English -The update could not be uninstalled because the request did not originate from a WSUS server. -. - -MessageId = 0x0029 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INVALID_PRODUCT_LICENSE -Language = English -Search may have missed some updates before there is an unlicensed application on the system. -. - -MessageId = 0x002A -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_MISSING_HANDLER -Language = English -A component required to detect applicable updates was missing. -. - -MessageId = 0x002B -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_LEGACYSERVER -Language = English -An operation did not complete because it requires a newer version of server. -. - -MessageId = 0x002C -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_BIN_SOURCE_ABSENT -Language = English -A delta-compressed update could not be installed because it required the source. -. - -MessageId = 0x002D -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SOURCE_ABSENT -Language = English -A full-file update could not be installed because it required the source. -. - -MessageId = 0x002E -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_WU_DISABLED -Language = English -Access to an unmanaged server is not allowed. -. - -MessageId = 0x002F -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_CALL_CANCELLED_BY_POLICY -Language = English -Operation did not complete because the DisableWindowsUpdateAccess policy was set. -. - -MessageId = 0x0030 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INVALID_PROXY_SERVER -Language = English -The format of the proxy list was invalid. -. - -MessageId = 0x0031 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INVALID_FILE -Language = English -The file is in the wrong format. -. - -MessageId = 0x0032 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INVALID_CRITERIA -Language = English -The search criteria string was invalid. -. - -MessageId = 0x0033 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_EULA_UNAVAILABLE -Language = English -License terms could not be downloaded. -. - -MessageId = 0x0034 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DOWNLOAD_FAILED -Language = English -Update failed to download. -. - -MessageId = 0x0035 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UPDATE_NOT_PROCESSED -Language = English -The update was not processed. -. - -MessageId = 0x0036 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INVALID_OPERATION -Language = English -The object's current state did not allow the operation. -. - -MessageId = 0x0037 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_NOT_SUPPORTED -Language = English -The functionality for the operation is not supported. -. - -MessageId = 0x0038 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_WINHTTP_INVALID_FILE -Language = English -The downloaded file has an unexpected content type. -. - -MessageId = 0x0039 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_TOO_MANY_RESYNC -Language = English -Agent is asked by server to resync too many times. -. - -MessageId = 0x0040 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_NO_SERVER_CORE_SUPPORT -Language = English -WUA API method does not run on Server Core installation. -. - -MessageId = 0x0041 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SYSPREP_IN_PROGRESS -Language = English -Service is not available while sysprep is running. -. - -MessageId = 0x0042 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UNKNOWN_SERVICE -Language = English -The update service is no longer registered with AU. -. - -MessageId = 0x0043 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_NO_UI_SUPPORT -Language = English -There is no support for WUA UI. -. - -MessageId = 0x0044 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PER_MACHINE_UPDATE_ACCESS_DENIED -Language = English -Only administrators can perform this operation on per-machine updates. -. - -MessageId = 0x0045 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UNSUPPORTED_SEARCHSCOPE -Language = English -A search was attempted with a scope that is not currently supported for this type of search. -. - -MessageId = 0x0046 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_BAD_FILE_URL -Language = English -The URL does not point to a file. -. - -MessageId = 0x0047 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_REVERT_NOT_ALLOWED -Language = English -The update could not be reverted. -. - -MessageId = 0x0048 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INVALID_NOTIFICATION_INFO -Language = English -The featured update notification info returned by the server is invalid. -. - -MessageId = 0x0049 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_OUTOFRANGE -Language = English -The data is out of range. -. - -MessageId = 0x004A -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SETUP_IN_PROGRESS -Language = English -Windows Update agent operations are not available while OS setup is running. -. - -MessageId = 0x004B -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_ORPHANED_DOWNLOAD_JOB -Language = English -An orphaned downloadjob was found with no active callers. -. - -MessageId = 0x004C -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_LOW_BATTERY -Language = English -An update could not be installed because the system battery power level is too low. -. - -MessageId = 0x004D -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INFRASTRUCTUREFILE_INVALID_FORMAT -Language = English -The downloaded infrastructure file is incorrectly formatted. -. - -MessageId = 0x004E -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INFRASTRUCTUREFILE_REQUIRES_SSL -Language = English -The infrastructure file must be downloaded using strong SSL. -. - -MessageId = 0x004F -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_IDLESHUTDOWN_OPCOUNT_DISCOVERY -Language = English -A discovery call contributed to a non-zero operation count at idle timer shutdown. -. - -MessageId = 0x0050 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_IDLESHUTDOWN_OPCOUNT_SEARCH -Language = English -A search call contributed to a non-zero operation count at idle timer shutdown. -. - -MessageId = 0x0051 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_IDLESHUTDOWN_OPCOUNT_DOWNLOAD -Language = English -A download call contributed to a non-zero operation count at idle timer shutdown. -. - -MessageId = 0x0052 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_IDLESHUTDOWN_OPCOUNT_INSTALL -Language = English -An install call contributed to a non-zero operation count at idle timer shutdown. -. - -MessageId = 0x0053 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_IDLESHUTDOWN_OPCOUNT_OTHER -Language = English -An unspecified call contributed to a non-zero operation count at idle timer shutdown. -. - -MessageId = 0x0054 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INTERACTIVE_CALL_CANCELLED -Language = English -An interactive user cancelled this operation, which was started from the Windows Update Agent UI. -. - -MessageId = 0x0055 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_AU_CALL_CANCELLED -Language = English -Automatic Updates cancelled this operation because it applies to an update that is no longer applicable to this computer. -. - -MessageId = 0x0056 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SYSTEM_UNSUPPORTED -Language = English -This version or edition of the operating system doesn't support the needed functionality. -. - -MessageId = 0x0057 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_NO_SUCH_HANDLER_PLUGIN -Language = English -The requested update download or install handler, or update applicability expression evaluator, is not provided by this Agent plugin. -. - -MessageId = 0x0058 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INVALID_SERIALIZATION_VERSION -Language = English -The requested serialization version is not supported. -. - -MessageId = 0x0059 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_NETWORK_COST_EXCEEDS_POLICY -Language = English -The current network cost does not meet the conditions set by the network cost policy. -. - -MessageId = 0x005A -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_CALL_CANCELLED_BY_HIDE -Language = English -The call is cancelled because it applies to an update that is hidden (no longer applicable to this computer). -. - -MessageId = 0x005B -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_CALL_CANCELLED_BY_INVALID -Language = English -The call is cancelled because it applies to an update that is invalid (no longer applicable to this computer). -. - -MessageId = 0x005C -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INVALID_VOLUMEID -Language = English -The specified volume id is invalid. -. - -MessageId = 0x005D -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UNRECOGNIZED_VOLUMEID -Language = English -The specified volume id is unrecognized by the system. -. - -MessageId = 0x005E -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_EXTENDEDERROR_NOTSET -Language = English -The installation extended error code is not specified. -. - -MessageId = 0x005F -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_EXTENDEDERROR_FAILED -Language = English -The installation extended error code is set to general fail. -. - -MessageId = 0x0060 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_IDLESHUTDOWN_OPCOUNT_SERVICEREGISTRATION -Language = English -A service registration call contributed to a non-zero operation count at idle timer shutdown. -. - -MessageId = 0x0061 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_FILETRUST_SHA2SIGNATURE_MISSING -Language = English -Signature validation of the file fails to find valid SHA2+ signature on MS signed payload. -. - -MessageId = 0x0062 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UPDATE_NOT_APPROVED -Language = English -The update is not in the servicing approval list. -. - -MessageId = 0x0063 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_CALL_CANCELLED_BY_INTERACTIVE_SEARCH -Language = English -The search call was cancelled by another interactive search against the same service. -. - -MessageId = 0x0064 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INSTALL_JOB_RESUME_NOT_ALLOWED -Language = English -Resume of install job not allowed due to another installation in progress. -. - -MessageId = 0x0065 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INSTALL_JOB_NOT_SUSPENDED -Language = English -Resume of install job not allowed because job is not suspended. -. - -MessageId = 0x0066 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INSTALL_USERCONTEXT_ACCESSDENIED -Language = English -User context passed to installation from caller with insufficient privileges. -. - -MessageId = 0x0067 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_STANDBY_ACTIVITY_NOT_ALLOWED -Language = English -Operation is not allowed because the device is in DC (Direct Current) and DS (Disconnected Standby). -. - -MessageId = 0x0068 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_COULD_NOT_EVALUATE_PROPERTY -Language = English -The property could not be evaluated. -. - -MessageId = 0x0FFF -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UNEXPECTED -Language = English -An operation failed due to reasons not covered by another error code. -. - -;/////////////////////////////////////////////////////////////////////////////// -;// Windows Installer minor errors -;// -;// The following errors are used to indicate that part of a search failed for -;// MSI problems. Another part of the search may successfully return updates. -;// All MSI minor codes should share the same error code range so that the caller -;// tell that they are related to Windows Installer. -;/////////////////////////////////////////////////////////////////////////////// -MessageId = 0x1001 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_MSI_WRONG_VERSION -Language = English -Search may have missed some updates because the Windows Installer is less than version 3.1. -. - -MessageId = 0x1002 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_MSI_NOT_CONFIGURED -Language = English -Search may have missed some updates because the Windows Installer is not configured. -. - -MessageId = 0x1003 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_MSP_DISABLED -Language = English -Search may have missed some updates because policy has disabled Windows Installer patching. -. - -MessageId = 0x1004 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_MSI_WRONG_APP_CONTEXT -Language = English -An update could not be applied because the application is installed per-user. -. - -MessageId = 0x1005 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_MSI_NOT_PRESENT -Language = English -Search may have missed some updates because the Windows Installer is less than version 3.1. -. - -MessageId = 0x1FFF -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_MSP_UNEXPECTED -Language = English -Search may have missed some updates because there was a failure of the Windows Installer. -. - -;/////////////////////////////////////////////////////////////////////////////// -;// Protocol Talker errors -;// -;// The following map to SOAPCLIENT_ERRORs from atlsoap.h. These errors -;// are obtained from calling GetClientError() on the CClientWebService -;// object. -;/////////////////////////////////////////////////////////////////////////////// -MessageId = 0x4000 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_SOAPCLIENT_BASE -Language = English -WU_E_PT_SOAPCLIENT_* error codes map to the SOAPCLIENT_ERROR enum of the ATL Server Library. -. - -MessageId = 0x4001 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_SOAPCLIENT_INITIALIZE -Language = English -SOAPCLIENT_INITIALIZE_ERROR - initialization of the SOAP client failed, possibly because of an MSXML installation failure. -. - -MessageId = 0x4002 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_SOAPCLIENT_OUTOFMEMORY -Language = English -SOAPCLIENT_OUTOFMEMORY - SOAP client failed because it ran out of memory. -. - -MessageId = 0x4003 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_SOAPCLIENT_GENERATE -Language = English -SOAPCLIENT_GENERATE_ERROR - SOAP client failed to generate the request. -. - -MessageId = 0x4004 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_SOAPCLIENT_CONNECT -Language = English -SOAPCLIENT_CONNECT_ERROR - SOAP client failed to connect to the server. -. - -MessageId = 0x4005 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_SOAPCLIENT_SEND -Language = English -SOAPCLIENT_SEND_ERROR - SOAP client failed to send a message for reasons of WU_E_WINHTTP_* error codes. -. - -MessageId = 0x4006 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_SOAPCLIENT_SERVER -Language = English -SOAPCLIENT_SERVER_ERROR - SOAP client failed because there was a server error. -. - -MessageId = 0x4007 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_SOAPCLIENT_SOAPFAULT -Language = English -SOAPCLIENT_SOAPFAULT - SOAP client failed because there was a SOAP fault for reasons of WU_E_PT_SOAP_* error codes. -. - -MessageId = 0x4008 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_SOAPCLIENT_PARSEFAULT -Language = English -SOAPCLIENT_PARSEFAULT_ERROR - SOAP client failed to parse a SOAP fault. -. - -MessageId = 0x4009 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_SOAPCLIENT_READ -Language = English -SOAPCLIENT_READ_ERROR - SOAP client failed while reading the response from the server. -. - -MessageId = 0x400A -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_SOAPCLIENT_PARSE -Language = English -SOAPCLIENT_PARSE_ERROR - SOAP client failed to parse the response from the server. -. - -;// The following map to SOAP_ERROR_CODEs from atlsoap.h. These errors -;// are obtained from the m_fault.m_soapErrCode member on the -;// CClientWebService object when GetClientError() returned -;// SOAPCLIENT_SOAPFAULT. -MessageId = 0x400B -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_SOAP_VERSION -Language = English -SOAP_E_VERSION_MISMATCH - SOAP client found an unrecognizable namespace for the SOAP envelope. -. - -MessageId = 0x400C -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_SOAP_MUST_UNDERSTAND -Language = English -SOAP_E_MUST_UNDERSTAND - SOAP client was unable to understand a header. -. - -MessageId = 0x400D -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_SOAP_CLIENT -Language = English -SOAP_E_CLIENT - SOAP client found the message was malformed; fix before resending. -. - -MessageId = 0x400E -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_SOAP_SERVER -Language = English -SOAP_E_SERVER - The SOAP message could not be processed due to a server error; resend later. -. - -MessageId = 0x400F -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_WMI_ERROR -Language = English -There was an unspecified Windows Management Instrumentation (WMI) error. -. - -MessageId = 0x4010 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_EXCEEDED_MAX_SERVER_TRIPS -Language = English -The number of round trips to the server exceeded the maximum limit. -. - -MessageId = 0x4011 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_SUS_SERVER_NOT_SET -Language = English -WUServer policy value is missing in the registry. -. - -MessageId = 0x4012 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_DOUBLE_INITIALIZATION -Language = English -Initialization failed because the object was already initialized. -. - -MessageId = 0x4013 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_INVALID_COMPUTER_NAME -Language = English -The computer name could not be determined. -. - -MessageId = 0x4015 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_REFRESH_CACHE_REQUIRED -Language = English -The reply from the server indicates that the server was changed or the cookie was invalid; refresh the state of the internal cache and retry. -. - -MessageId = 0x4016 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_HTTP_STATUS_BAD_REQUEST -Language = English -HTTP status 400 - the server could not process the request due to invalid syntax. -. - -MessageId = 0x4017 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_HTTP_STATUS_DENIED -Language = English -HTTP status 401 - the requested resource requires user authentication. -. - -MessageId = 0x4018 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_HTTP_STATUS_FORBIDDEN -Language = English -HTTP status 403 - server understood the request, but declined to fulfill it. -. - -MessageId = 0x4019 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_HTTP_STATUS_NOT_FOUND -Language = English -HTTP status 404 - the server cannot find the requested URI (Uniform Resource Identifier). -. - -MessageId = 0x401A -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_HTTP_STATUS_BAD_METHOD -Language = English -HTTP status 405 - the HTTP method is not allowed. -. - -MessageId = 0x401B -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_HTTP_STATUS_PROXY_AUTH_REQ -Language = English -HTTP status 407 - proxy authentication is required. -. - -MessageId = 0x401C -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_HTTP_STATUS_REQUEST_TIMEOUT -Language = English -HTTP status 408 - the server timed out waiting for the request. -. - -MessageId = 0x401D -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_HTTP_STATUS_CONFLICT -Language = English -HTTP status 409 - the request was not completed due to a conflict with the current state of the resource. -. - -MessageId = 0x401E -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_HTTP_STATUS_GONE -Language = English -HTTP status 410 - requested resource is no longer available at the server. -. - -MessageId = 0x401F -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_HTTP_STATUS_SERVER_ERROR -Language = English -HTTP status 500 - an error internal to the server prevented fulfilling the request. -. - -MessageId = 0x4020 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_HTTP_STATUS_NOT_SUPPORTED -Language = English -HTTP status 501 - server does not support the functionality required to fulfill the request. -. - -MessageId = 0x4021 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_HTTP_STATUS_BAD_GATEWAY -Language = English -HTTP status 502 - the server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request. -. - -MessageId = 0x4022 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_HTTP_STATUS_SERVICE_UNAVAIL -Language = English -HTTP status 503 - the service is temporarily overloaded. -. - -MessageId = 0x4023 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_HTTP_STATUS_GATEWAY_TIMEOUT -Language = English -HTTP status 504 - the request was timed out waiting for a gateway. -. - -MessageId = 0x4024 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_HTTP_STATUS_VERSION_NOT_SUP -Language = English -HTTP status 505 - the server does not support the HTTP protocol version used for the request. -. - -MessageId = 0x4025 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_FILE_LOCATIONS_CHANGED -Language = English -Operation failed due to a changed file location; refresh internal state and resend. -. - -MessageId = 0x4026 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_REGISTRATION_NOT_SUPPORTED -Language = English -Operation failed because Windows Update Agent does not support registration with a non-WSUS server. -. - -MessageId = 0x4027 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_NO_AUTH_PLUGINS_REQUESTED -Language = English -The server returned an empty authentication information list. -. - -MessageId = 0x4028 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_NO_AUTH_COOKIES_CREATED -Language = English -Windows Update Agent was unable to create any valid authentication cookies. -. - -MessageId = 0x4029 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_INVALID_CONFIG_PROP -Language = English -A configuration property value was wrong. -. - -MessageId = 0x402A -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_CONFIG_PROP_MISSING -Language = English -A configuration property value was missing. -. - -MessageId = 0x402B -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_HTTP_STATUS_NOT_MAPPED -Language = English -The HTTP request could not be completed and the reason did not correspond to any of the WU_E_PT_HTTP_* error codes. -. - -MessageId = 0x402C -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_WINHTTP_NAME_NOT_RESOLVED -Language = English -ERROR_WINHTTP_NAME_NOT_RESOLVED - the proxy server or target server name cannot be resolved. -. - -MessageId = 0x402D -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_LOAD_SHEDDING -Language = English -The server is shedding load. -. - -MessageId = 0x402E -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_CLIENT_ENFORCED_LOAD_SHEDDING -Language = English -Windows Update Agent is enforcing honoring the service load shedding interval. -. - -MessageId = 0x502D -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_SAME_REDIR_ID -Language = English -Windows Update Agent failed to download a redirector cabinet file with a new redirectorId value from the server during the recovery. -. - -MessageId = 0x502E -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_NO_MANAGED_RECOVER -Language = English -A redirector recovery action did not complete because the server is managed. -. - -MessageId = 0x402F -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_ECP_SUCCEEDED_WITH_ERRORS -Language = English -External cab file processing completed with some errors. -. - -MessageId = 0x4030 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_ECP_INIT_FAILED -Language = English -The external cab processor initialization did not complete. -. - -MessageId = 0x4031 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_ECP_INVALID_FILE_FORMAT -Language = English -The format of a metadata file was invalid. -. - -MessageId = 0x4032 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_ECP_INVALID_METADATA -Language = English -External cab processor found invalid metadata. -. - -MessageId = 0x4033 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_ECP_FAILURE_TO_EXTRACT_DIGEST -Language = English -The file digest could not be extracted from an external cab file. -. - -MessageId = 0x4034 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_ECP_FAILURE_TO_DECOMPRESS_CAB_FILE -Language = English -An external cab file could not be decompressed. -. - -MessageId = 0x4035 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_ECP_FILE_LOCATION_ERROR -Language = English -External cab processor was unable to get file locations. -. - -MessageId = 0x0436 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_CATALOG_SYNC_REQUIRED -Language = English -The server does not support category-specific search; Full catalog search has to be issued instead. -. - -MessageId = 0x0437 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_SECURITY_VERIFICATION_FAILURE -Language = English -There was a problem authorizing with the service. -. - -MessageId = 0x0438 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_ENDPOINT_UNREACHABLE -Language = English -There is no route or network connectivity to the endpoint. -. - -MessageId = 0x0439 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_INVALID_FORMAT -Language = English -The data received does not meet the data contract expectations. -. - -MessageId = 0x043A -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_INVALID_URL -Language = English -The url is invalid. -. - -MessageId = 0x043B -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_NWS_NOT_LOADED -Language = English -Unable to load NWS runtime. -. - -MessageId = 0x043C -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_PROXY_AUTH_SCHEME_NOT_SUPPORTED -Language = English -The proxy auth scheme is not supported. -. - -MessageId = 0x043D -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SERVICEPROP_NOTAVAIL -Language = English -The requested service property is not available. -. - -MessageId = 0x043E -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_ENDPOINT_REFRESH_REQUIRED -Language = English -The endpoint provider plugin requires online refresh. -. - -MessageId = 0x043F -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_ENDPOINTURL_NOTAVAIL -Language = English -A URL for the requested service endpoint is not available. -. - -MessageId = 0x0440 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_ENDPOINT_DISCONNECTED -Language = English -The connection to the service endpoint died. -. - -MessageId = 0x0441 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_INVALID_OPERATION -Language = English -The operation is invalid because protocol talker is in an inappropriate state. -. - -;// Same as WS_E_OBJECT_FAULTED -MessageId = 0x0442 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_OBJECT_FAULTED -Language = English -The object is in a faulted state due to a previous error. -. - -;// Same as WS_E_NUMERIC_OVERFLOW -MessageId = 0x0443 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_NUMERIC_OVERFLOW -Language = English -The operation would lead to numeric overflow. -. - -;// Same as WS_E_OPERATION_ABORTED -MessageId = 0x0444 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_OPERATION_ABORTED -Language = English -The operation was aborted. -. - -;// Same as WS_E_OPERATION_ABANDONED -MessageId = 0x0445 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_OPERATION_ABANDONED -Language = English -The operation was abandoned. -. - -;// Same as WS_E_QUOTA_EXCEEDED -MessageId = 0x0446 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_QUOTA_EXCEEDED -Language = English -A quota was exceeded. -. - -;// Same as WS_E_NO_TRANSLATION_AVAILABLE -MessageId = 0x0447 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_NO_TRANSLATION_AVAILABLE -Language = English -The information was not available in the specified language. -. - -;// Same as WS_E_ADDRESS_IN_USE -MessageId = 0x0448 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_ADDRESS_IN_USE -Language = English -The address is already being used. -. - -;// Same as WS_E_ADDRESS_NOT_AVAILABLE -MessageId = 0x0449 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_ADDRESS_NOT_AVAILABLE -Language = English -The address is not valid for this context. -. - -;// Same as WS_E_OTHER -MessageId = 0x044A -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_OTHER -Language = English -Unrecognized error occurred in the Windows Web Services framework. -. - -;// Same as WS_E_SECURITY_SYSTEM_FAILURE -MessageId = 0x044B -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_SECURITY_SYSTEM_FAILURE -Language = English -A security operation failed in the Windows Web Services framework. -. - -MessageId = 0x4100 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_DATA_BOUNDARY_RESTRICTED -Language = English -The client is data boundary restricted and needs to talk to a restricted endpoint. -. - -MessageId = 0x4101 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_GENERAL_AAD_CLIENT_ERROR -Language = English -The client hit an error in retrieving AAD device ticket. -. - -MessageId = 0x4FFF -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_PT_UNEXPECTED -Language = English -A communication error not covered by another WU_E_PT_* error code. -. - -;/////////////////////////////////////////////////////////////////////////////// -;// Redirector errors -;// -;// The following errors are generated by the components that download and -;// parse the wuredir.cab -;/////////////////////////////////////////////////////////////////////////////// -MessageId = 0x5001 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_REDIRECTOR_LOAD_XML -Language = English -The redirector XML document could not be loaded into the DOM class. -. - -MessageId = 0x5002 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_REDIRECTOR_S_FALSE -Language = English -The redirector XML document is missing some required information. -. - -MessageId = 0x5003 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_REDIRECTOR_ID_SMALLER -Language = English -The redirectorId in the downloaded redirector cab is less than in the cached cab. -. - -MessageId = 0x5004 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_REDIRECTOR_UNKNOWN_SERVICE -Language = English -The service ID is not supported in the service environment. -. - -MessageId = 0x5005 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_REDIRECTOR_UNSUPPORTED_CONTENTTYPE -Language = English -The response from the redirector server had an unsupported content type. -. - -MessageId = 0x5006 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_REDIRECTOR_INVALID_RESPONSE -Language = English -The response from the redirector server had an error status or was invalid. -. - -MessageId = 0x5008 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_REDIRECTOR_ATTRPROVIDER_EXCEEDED_MAX_NAMEVALUE -Language = English -The maximum number of name value pairs was exceeded by the attribute provider. -. - -MessageId = 0x5009 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_REDIRECTOR_ATTRPROVIDER_INVALID_NAME -Language = English -The name received from the attribute provider was invalid. -. - -MessageId = 0x500A -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_REDIRECTOR_ATTRPROVIDER_INVALID_VALUE -Language = English -The value received from the attribute provider was invalid. -. - -MessageId = 0x500B -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_REDIRECTOR_SLS_GENERIC_ERROR -Language = English -There was an error in connecting to or parsing the response from the Service Locator Service redirector server. -. - -MessageId = 0x500C -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_REDIRECTOR_CONNECT_POLICY -Language = English -Connections to the redirector server are disallowed by managed policy. -. - -MessageId = 0x500D -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_REDIRECTOR_ONLINE_DISALLOWED -Language = English -The redirector would go online but is disallowed by caller configuration. -. - -MessageId = 0x50FF -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_REDIRECTOR_UNEXPECTED -Language = English -The redirector failed for reasons not covered by another WU_E_REDIRECTOR_* error code. -. - -;/////////////////////////////////////////////////////////////////////////////// -;// SIH errors -;// -;// The following errors are generated by the components that are involved with -;// service-initiated healing. -;/////////////////////////////////////////////////////////////////////////////// -MessageId = 0x5101 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SIH_VERIFY_DOWNLOAD_ENGINE -Language = English -Verification of the servicing engine package failed. -. - -MessageId = 0x5102 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SIH_VERIFY_DOWNLOAD_PAYLOAD -Language = English -Verification of a servicing package failed. -. - -MessageId = 0x5103 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SIH_VERIFY_STAGE_ENGINE -Language = English -Verification of the staged engine failed. -. - -MessageId = 0x5104 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SIH_VERIFY_STAGE_PAYLOAD -Language = English -Verification of a staged payload failed. -. - -MessageId = 0x5105 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SIH_ACTION_NOT_FOUND -Language = English -An internal error occurred where the servicing action was not found. -. - -MessageId = 0x5106 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SIH_SLS_PARSE -Language = English -There was a parse error in the service environment response. -. - -MessageId = 0x5107 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SIH_INVALIDHASH -Language = English -A downloaded file failed an integrity check. -. - -MessageId = 0x5108 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SIH_NO_ENGINE -Language = English -No engine was provided by the server-initiated healing server response. -. - -MessageId = 0x5109 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SIH_POST_REBOOT_INSTALL_FAILED -Language = English -Post-reboot install failed. -. - -MessageId = 0x510A -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SIH_POST_REBOOT_NO_CACHED_SLS_RESPONSE -Language = English -There were pending reboot actions, but cached SLS response was not found post-reboot. -. - -MessageId = 0x510B -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SIH_PARSE -Language = English -Parsing command line arguments failed. -. - -MessageId = 0x510C -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SIH_SECURITY -Language = English -Security check failed. -. - -MessageId = 0x510D -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SIH_PPL -Language = English -PPL check failed. -. - -MessageId = 0x510E -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SIH_POLICY -Language = English -Execution was disabled by policy. -. - -MessageId = 0x510F -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SIH_STDEXCEPTION -Language = English -A standard exception was caught. -. - -MessageId = 0x5110 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SIH_NONSTDEXCEPTION -Language = English -A non-standard exception was caught. -. - -MessageId = 0x5111 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SIH_ENGINE_EXCEPTION -Language = English -The server-initiated healing engine encountered an exception not covered by another WU_E_SIH_* error code. -. - -MessageId = 0x5112 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SIH_BLOCKED_FOR_PLATFORM -Language = English -You are running SIH Client with cmd not supported on your platform. -. - -MessageId = 0x5113 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SIH_ANOTHER_INSTANCE_RUNNING -Language = English -Another SIH Client is already running. -. - -MessageId = 0x5114 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SIH_DNSRESILIENCY_OFF -Language = English -Disable DNS resiliency feature per service configuration. -. - -MessageId = 0x51FF -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SIH_UNEXPECTED -Language = English -There was a failure for reasons not covered by another WU_E_SIH_* error code. -. - -;/////////////////////////////////////////////////////////////////////////////// -;// driver util errors -;// -;// The device PnP enumerated device was pruned from the SystemSpec because -;// one of the hardware or compatible IDs matched an installed printer driver. -;// This is not considered a fatal error and the device is simply skipped. -;/////////////////////////////////////////////////////////////////////////////// -MessageId = 0xC001 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DRV_PRUNED -Language = English -A driver was skipped. -. - -MessageId = 0xC002 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DRV_NOPROP_OR_LEGACY -Language = English -A property for the driver could not be found. It may not conform with required specifications. -. - -MessageId = 0xC003 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DRV_REG_MISMATCH -Language = English -The registry type read for the driver does not match the expected type. -. - -MessageId = 0xC004 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DRV_NO_METADATA -Language = English -The driver update is missing metadata. -. - -MessageId = 0xC005 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DRV_MISSING_ATTRIBUTE -Language = English -The driver update is missing a required attribute. -. - -MessageId = 0xC006 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DRV_SYNC_FAILED -Language = English -Driver synchronization failed. -. - -MessageId = 0xC007 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DRV_NO_PRINTER_CONTENT -Language = English -Information required for the synchronization of applicable printers is missing. -. - -MessageId = 0xC008 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DRV_DEVICE_PROBLEM -Language = English -After installing a driver update, the updated device has reported a problem. -. - -;// MessageId 0xCE00 through 0xCEFF are reserved for post-install driver problem codes -;// (see uhdriver.cpp) -MessageId = 0xCFFF -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DRV_UNEXPECTED -Language = English -A driver error not covered by another WU_E_DRV_* code. -. - -;////////////////////////////////////////////////////////////////////////////// -;// data store errors -;/////////////////////////////////////////////////////////////////////////////// -MessageId = 0x8000 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_SHUTDOWN -Language = English -An operation failed because Windows Update Agent is shutting down. -. - -MessageId = 0x8001 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_INUSE -Language = English -An operation failed because the data store was in use. -. - -MessageId = 0x8002 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_INVALID -Language = English -The current and expected states of the data store do not match. -. - -MessageId = 0x8003 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_TABLEMISSING -Language = English -The data store is missing a table. -. - -MessageId = 0x8004 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_TABLEINCORRECT -Language = English -The data store contains a table with unexpected columns. -. - -MessageId = 0x8005 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_INVALIDTABLENAME -Language = English -A table could not be opened because the table is not in the data store. -. - -MessageId = 0x8006 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_BADVERSION -Language = English -The current and expected versions of the data store do not match. -. - -MessageId = 0x8007 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_NODATA -Language = English -The information requested is not in the data store. -. - -MessageId = 0x8008 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_MISSINGDATA -Language = English -The data store is missing required information or has a NULL in a table column that requires a non-null value. -. - -MessageId = 0x8009 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_MISSINGREF -Language = English -The data store is missing required information or has a reference to missing license terms, file, localized property or linked row. -. - -MessageId = 0x800A -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_UNKNOWNHANDLER -Language = English -The update was not processed because its update handler could not be recognized. -. - -MessageId = 0x800B -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_CANTDELETE -Language = English -The update was not deleted because it is still referenced by one or more services. -. - -MessageId = 0x800C -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_LOCKTIMEOUTEXPIRED -Language = English -The data store section could not be locked within the allotted time. -. - -MessageId = 0x800D -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_NOCATEGORIES -Language = English -The category was not added because it contains no parent categories and is not a top-level category itself. -. - -MessageId = 0x800E -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_ROWEXISTS -Language = English -The row was not added because an existing row has the same primary key. -. - -MessageId = 0x800F -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_STOREFILELOCKED -Language = English -The data store could not be initialized because it was locked by another process. -. - -MessageId = 0x8010 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_CANNOTREGISTER -Language = English -The data store is not allowed to be registered with COM in the current process. -. - -MessageId = 0x8011 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_UNABLETOSTART -Language = English -Could not create a data store object in another process. -. - -MessageId = 0x8013 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_DUPLICATEUPDATEID -Language = English -The server sent the same update to the client with two different revision IDs. -. - -MessageId = 0x8014 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_UNKNOWNSERVICE -Language = English -An operation did not complete because the service is not in the data store. -. - -MessageId = 0x8015 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_SERVICEEXPIRED -Language = English -An operation did not complete because the registration of the service has expired. -. - -MessageId = 0x8016 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_DECLINENOTALLOWED -Language = English -A request to hide an update was declined because it is a mandatory update or because it was deployed with a deadline. -. - -MessageId = 0x8017 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_TABLESESSIONMISMATCH -Language = English -A table was not closed because it is not associated with the session. -. - -MessageId = 0x8018 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_SESSIONLOCKMISMATCH -Language = English -A table was not closed because it is not associated with the session. -. - -MessageId = 0x8019 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_NEEDWINDOWSSERVICE -Language = English -A request to remove the Windows Update service or to unregister it with Automatic Updates was declined because it is a built-in service and/or Automatic Updates cannot fall back to another service. -. - -MessageId = 0x801A -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_INVALIDOPERATION -Language = English -A request was declined because the operation is not allowed. -. - -MessageId = 0x801B -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_SCHEMAMISMATCH -Language = English -The schema of the current data store and the schema of a table in a backup XML document do not match. -. - -MessageId = 0x801C -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_RESETREQUIRED -Language = English -The data store requires a session reset; release the session and retry with a new session. -. - -MessageId = 0x801D -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_IMPERSONATED -Language = English -A data store operation did not complete because it was requested with an impersonated identity. -. - -MessageId = 0x801E -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_DATANOTAVAILABLE -Language = English -An operation against update metadata did not complete because the data was never received from server. -. - -MessageId = 0x801F -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_DATANOTLOADED -Language = English -An operation against update metadata did not complete because the data was available but not loaded from datastore. -. - -MessageId = 0x8020 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_NODATA_NOSUCHREVISION -Language = English -A data store operation did not complete because no such update revision is known. -. - -MessageId = 0x8021 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_NODATA_NOSUCHUPDATE -Language = English -A data store operation did not complete because no such update is known. -. - -MessageId = 0x8022 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_NODATA_EULA -Language = English -A data store operation did not complete because an update's EULA information is missing. -. - -MessageId = 0x8023 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_NODATA_SERVICE -Language = English -A data store operation did not complete because a service's information is missing. -. - -MessageId = 0x8024 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_NODATA_COOKIE -Language = English -A data store operation did not complete because a service's synchronization information is missing. -. - -MessageId = 0x8025 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_NODATA_TIMER -Language = English -A data store operation did not complete because a timer's information is missing. -. - -MessageId = 0x8026 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_NODATA_CCR -Language = English -A data store operation did not complete because a download's information is missing. -. - -MessageId = 0x8027 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_NODATA_FILE -Language = English -A data store operation did not complete because a file's information is missing. -. - -MessageId = 0x8028 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_NODATA_DOWNLOADJOB -Language = English -A data store operation did not complete because a download job's information is missing. -. - -MessageId = 0x8029 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_NODATA_TMI -Language = English -A data store operation did not complete because a service's timestamp information is missing. -. - -MessageId = 0x8FFF -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DS_UNEXPECTED -Language = English -A data store error not covered by another WU_E_DS_* code. -. - -;///////////////////////////////////////////////////////////////////////////// -;//Inventory Errors -;///////////////////////////////////////////////////////////////////////////// -MessageId = 0x9001 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INVENTORY_PARSEFAILED -Language = English -Parsing of the rule file failed. -. - -MessageId = 0x9002 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INVENTORY_GET_INVENTORY_TYPE_FAILED -Language = English -Failed to get the requested inventory type from the server. -. - -MessageId = 0x9003 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INVENTORY_RESULT_UPLOAD_FAILED -Language = English -Failed to upload inventory result to the server. -. - -MessageId = 0x9004 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INVENTORY_UNEXPECTED -Language = English -There was an inventory error not covered by another error code. -. - -MessageId = 0x9005 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INVENTORY_WMI_ERROR -Language = English -A WMI error occurred when enumerating the instances for a particular class. -. - -;///////////////////////////////////////////////////////////////////////////// -;//AU Errors -;///////////////////////////////////////////////////////////////////////////// -MessageId = 0xA000 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_AU_NOSERVICE -Language = English -Automatic Updates was unable to service incoming requests. -. - -MessageId = 0xA002 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_AU_NONLEGACYSERVER -Language = English -The old version of the Automatic Updates client has stopped because the WSUS server has been upgraded. -. - -MessageId = 0xA003 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_AU_LEGACYCLIENTDISABLED -Language = English -The old version of the Automatic Updates client was disabled. -. - -MessageId = 0xA004 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_AU_PAUSED -Language = English -Automatic Updates was unable to process incoming requests because it was paused. -. - -MessageId = 0xA005 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_AU_NO_REGISTERED_SERVICE -Language = English -No unmanaged service is registered with AU. -. - -MessageId = 0xA006 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_AU_DETECT_SVCID_MISMATCH -Language = English -The default service registered with AU changed during the search. -. - -MessageId = 0xA007 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_REBOOT_IN_PROGRESS -Language = English -A reboot is in progress. -. - -MessageId = 0xA008 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_AU_OOBE_IN_PROGRESS -Language = English -Automatic Updates can't process incoming requests while Windows Welcome is running. -. - -MessageId = 0xAFFF -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_AU_UNEXPECTED -Language = English -An Automatic Updates error not covered by another WU_E_AU * code. -. - -;////////////////////////////////////////////////////////////////////////////// -;// update handler errors -;/////////////////////////////////////////////////////////////////////////////// -MessageId = 0x2000 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_REMOTEUNAVAILABLE -Language = English -A request for a remote update handler could not be completed because no remote process is available. -. - -MessageId = 0x2001 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_LOCALONLY -Language = English -A request for a remote update handler could not be completed because the handler is local only. -. - -MessageId = 0x2002 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_UNKNOWNHANDLER -Language = English -A request for an update handler could not be completed because the handler could not be recognized. -. - -MessageId = 0x2003 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_REMOTEALREADYACTIVE -Language = English -A remote update handler could not be created because one already exists. -. - -MessageId = 0x2004 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_DOESNOTSUPPORTACTION -Language = English -A request for the handler to install (uninstall) an update could not be completed because the update does not support install (uninstall). -. - -MessageId = 0x2005 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_WRONGHANDLER -Language = English -An operation did not complete because the wrong handler was specified. -. - -MessageId = 0x2006 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_INVALIDMETADATA -Language = English -A handler operation could not be completed because the update contains invalid metadata. -. - -MessageId = 0x2007 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_INSTALLERHUNG -Language = English -An operation could not be completed because the installer exceeded the time limit. -. - -MessageId = 0x2008 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_OPERATIONCANCELLED -Language = English -An operation being done by the update handler was cancelled. -. - -MessageId = 0x2009 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_BADHANDLERXML -Language = English -An operation could not be completed because the handler-specific metadata is invalid. -. - -MessageId = 0x200A -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_CANREQUIREINPUT -Language = English -A request to the handler to install an update could not be completed because the update requires user input. -. - -MessageId = 0x200B -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_INSTALLERFAILURE -Language = English -The installer failed to install (uninstall) one or more updates. -. - -MessageId = 0x200C -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_FALLBACKTOSELFCONTAINED -Language = English -The update handler should download self-contained content rather than delta-compressed content for the update. -. - -MessageId = 0x200D -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_NEEDANOTHERDOWNLOAD -Language = English -The update handler did not install the update because it needs to be downloaded again. -. - -MessageId = 0x200E -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_NOTIFYFAILURE -Language = English -The update handler failed to send notification of the status of the install (uninstall) operation. -. - -MessageId = 0x200F -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_INCONSISTENT_FILE_NAMES -Language = English -The file names contained in the update metadata and in the update package are inconsistent. -. - -MessageId = 0x2010 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_FALLBACKERROR -Language = English -The update handler failed to fall back to the self-contained content. -. - -MessageId = 0x2011 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_TOOMANYDOWNLOADREQUESTS -Language = English -The update handler has exceeded the maximum number of download requests. -. - -MessageId = 0x2012 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_UNEXPECTEDCBSRESPONSE -Language = English -The update handler has received an unexpected response from CBS. -. - -MessageId = 0x2013 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_BADCBSPACKAGEID -Language = English -The update metadata contains an invalid CBS package identifier. -. - -MessageId = 0x2014 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_POSTREBOOTSTILLPENDING -Language = English -The post-reboot operation for the update is still in progress. -. - -MessageId = 0x2015 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_POSTREBOOTRESULTUNKNOWN -Language = English -The result of the post-reboot operation for the update could not be determined. -. - -MessageId = 0x2016 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_POSTREBOOTUNEXPECTEDSTATE -Language = English -The state of the update after its post-reboot operation has completed is unexpected. -. - -MessageId = 0x2017 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_NEW_SERVICING_STACK_REQUIRED -Language = English -The OS servicing stack must be updated before this update is downloaded or installed. -. - -MessageId = 0x2018 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_CALLED_BACK_FAILURE -Language = English -A callback installer called back with an error. -. - -MessageId = 0x2019 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_CUSTOMINSTALLER_INVALID_SIGNATURE -Language = English -The custom installer signature did not match the signature required by the update. -. - -MessageId = 0x201A -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_UNSUPPORTED_INSTALLCONTEXT -Language = English -The installer does not support the installation configuration. -. - -MessageId = 0x201B -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_INVALID_TARGETSESSION -Language = English -The targeted session for install is invalid. -. - -MessageId = 0x201C -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_DECRYPTFAILURE -Language = English -The handler failed to decrypt the update files. -. - -MessageId = 0x201D -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_HANDLER_DISABLEDUNTILREBOOT -Language = English -The update handler is disabled until the system reboots. -. - -MessageId = 0x201E -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_APPX_NOT_PRESENT -Language = English -The AppX infrastructure is not present on the system. -. - -MessageId = 0x201F -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_NOTREADYTOCOMMIT -Language = English -The update cannot be committed because it has not been previously installed or staged. -. - -MessageId = 0x2020 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_APPX_INVALID_PACKAGE_VOLUME -Language = English -The specified volume is not a valid AppX package volume. -. - -MessageId = 0x2021 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_APPX_DEFAULT_PACKAGE_VOLUME_UNAVAILABLE -Language = English -The configured default storage volume is unavailable. -. - -MessageId = 0x2022 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_APPX_INSTALLED_PACKAGE_VOLUME_UNAVAILABLE -Language = English -The volume on which the application is installed is unavailable. -. - -MessageId = 0x2023 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_APPX_PACKAGE_FAMILY_NOT_FOUND -Language = English -The specified package family is not present on the system. -. - -MessageId = 0x2024 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_APPX_SYSTEM_VOLUME_NOT_FOUND -Language = English -Unable to find a package volume marked as system. -. - -MessageId = 0x2025 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_UA_SESSION_INFO_VERSION_NOT_SUPPORTED -Language = English -UA does not support the version of OptionalSessionInfo. -. - -MessageId = 0x2026 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_RESERVICING_REQUIRED_BASELINE -Language = English -This operation cannot be completed. You must install the baseline update(s) before you can install this update. -. - -MessageId = 0x2FFF -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UH_UNEXPECTED -Language = English -An update handler error not covered by another WU_E_UH_* code. -. - -;////////////////////////////////////////////////////////////////////////////// -;// download manager errors -;/////////////////////////////////////////////////////////////////////////////// -MessageId = 0x6001 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_URLNOTAVAILABLE -Language = English -A download manager operation could not be completed because the requested file does not have a URL. -. - -MessageId = 0x6002 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_INCORRECTFILEHASH -Language = English -A download manager operation could not be completed because the file digest was not recognized. -. - -MessageId = 0x6003 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_UNKNOWNALGORITHM -Language = English -A download manager operation could not be completed because the file metadata requested an unrecognized hash algorithm. -. - -MessageId = 0x6004 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_NEEDDOWNLOADREQUEST -Language = English -An operation could not be completed because a download request is required from the download handler. -. - -MessageId = 0x6005 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_NONETWORK -Language = English -A download manager operation could not be completed because the network connection was unavailable. -. - -MessageId = 0x6006 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_WRONGBITSVERSION -Language = English -A download manager operation could not be completed because the version of Background Intelligent Transfer Service (BITS) is incompatible. -. - -MessageId = 0x6007 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_NOTDOWNLOADED -Language = English -The update has not been downloaded. -. - -MessageId = 0x6008 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_FAILTOCONNECTTOBITS -Language = English -A download manager operation failed because the download manager was unable to connect the Background Intelligent Transfer Service (BITS). -. - -MessageId = 0x6009 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_BITSTRANSFERERROR -Language = English -A download manager operation failed because there was an unspecified Background Intelligent Transfer Service (BITS) transfer error. -. - -MessageId = 0x600A -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_DOWNLOADLOCATIONCHANGED -Language = English -A download must be restarted because the location of the source of the download has changed. -. - -MessageId = 0x600B -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_CONTENTCHANGED -Language = English -A download must be restarted because the update content changed in a new revision. -. - -MessageId = 0x600C -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_DOWNLOADLIMITEDBYUPDATESIZE -Language = English -A download failed because the current network limits downloads by update size for the update service. -. - -MessageId = 0x600E -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_UNAUTHORIZED -Language = English -The download failed because the client was denied authorization to download the content. -. - -MessageId = 0x600F -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_BG_ERROR_TOKEN_REQUIRED -Language = English -The download failed because the user token associated with the BITS job no longer exists. -. - -MessageId = 0x6010 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_DOWNLOADSANDBOXNOTFOUND -Language = English -The sandbox directory for the downloaded update was not found. -. - -MessageId = 0x6011 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_DOWNLOADFILEPATHUNKNOWN -Language = English -The downloaded update has an unknown file path. -. - -MessageId = 0x6012 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_DOWNLOADFILEMISSING -Language = English -One or more of the files for the downloaded update is missing. -. - -MessageId = 0x6013 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_UPDATEREMOVED -Language = English -An attempt was made to access a downloaded update that has already been removed. -. - -MessageId = 0x6014 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_READRANGEFAILED -Language = English -Windows Update couldn't find a needed portion of a downloaded update's file. -. - -MessageId = 0x6016 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_UNAUTHORIZED_NO_USER -Language = English -The download failed because the client was denied authorization to download the content due to no user logged on. -. - -MessageId = 0x6017 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_UNAUTHORIZED_LOCAL_USER -Language = English -The download failed because the local user was denied authorization to download the content. -. - -MessageId = 0x6018 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_UNAUTHORIZED_DOMAIN_USER -Language = English -The download failed because the domain user was denied authorization to download the content. -. - -MessageId = 0x6019 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_UNAUTHORIZED_MSA_USER -Language = English -The download failed because the MSA account associated with the user was denied authorization to download the content. -. - -MessageId = 0x601A -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_FALLINGBACKTOBITS -Language = English -The download will be continued by falling back to BITS to download the content. -. - -MessageId = 0x601B -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_DOWNLOAD_VOLUME_CONFLICT -Language = English -Another caller has requested download to a different volume. -. - -MessageId = 0x601C -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_SANDBOX_HASH_MISMATCH -Language = English -The hash of the update's sandbox does not match the expected value. -. - -MessageId = 0x601D -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_HARDRESERVEID_CONFLICT -Language = English -The hard reserve id specified conflicts with an id from another caller. -. - -MessageId = 0x601E -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_DOSVC_REQUIRED -Language = English -The update has to be downloaded via DO. -. - -MessageId = 0x601F -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_DOWNLOADTYPE_CONFLICT -Language = English -Windows Update only supports one download type per update at one time. The download failure is by design here since the same update with different download type is operating. Please try again later. -. - -MessageId = 0x6FFF -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_DM_UNEXPECTED -Language = English -There was a download manager error not covered by another WU_E_DM_* error code. -. - -;////////////////////////////////////////////////////////////////////////////// -;// Setup/SelfUpdate errors -;/////////////////////////////////////////////////////////////////////////////// -MessageId = 0xD001 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SETUP_INVALID_INFDATA -Language = English -Windows Update Agent could not be updated because an INF file contains invalid information. -. - -MessageId = 0xD002 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SETUP_INVALID_IDENTDATA -Language = English -Windows Update Agent could not be updated because the wuident.cab file contains invalid information. -. - -MessageId = 0xD003 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SETUP_ALREADY_INITIALIZED -Language = English -Windows Update Agent could not be updated because of an internal error that caused setup initialization to be performed twice. -. - -MessageId = 0xD004 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SETUP_NOT_INITIALIZED -Language = English -Windows Update Agent could not be updated because setup initialization never completed successfully. -. - -MessageId = 0xD005 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SETUP_SOURCE_VERSION_MISMATCH -Language = English -Windows Update Agent could not be updated because the versions specified in the INF do not match the actual source file versions. -. - -MessageId = 0xD006 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SETUP_TARGET_VERSION_GREATER -Language = English -Windows Update Agent could not be updated because a WUA file on the target system is newer than the corresponding source file. -. - -MessageId = 0xD007 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SETUP_REGISTRATION_FAILED -Language = English -Windows Update Agent could not be updated because regsvr32.exe returned an error. -. - -MessageId = 0xD008 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SELFUPDATE_SKIP_ON_FAILURE -Language = English -An update to the Windows Update Agent was skipped because previous attempts to update have failed. -. - -MessageId = 0xD009 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SETUP_SKIP_UPDATE -Language = English -An update to the Windows Update Agent was skipped due to a directive in the wuident.cab file. -. - -MessageId = 0xD00A -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SETUP_UNSUPPORTED_CONFIGURATION -Language = English -Windows Update Agent could not be updated because the current system configuration is not supported. -. - -MessageId = 0xD00B -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SETUP_BLOCKED_CONFIGURATION -Language = English -Windows Update Agent could not be updated because the system is configured to block the update. -. - -MessageId = 0xD00C -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SETUP_REBOOT_TO_FIX -Language = English -Windows Update Agent could not be updated because a restart of the system is required. -. - -MessageId = 0xD00D -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SETUP_ALREADYRUNNING -Language = English -Windows Update Agent setup is already running. -. - -MessageId = 0xD00E -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SETUP_REBOOTREQUIRED -Language = English -Windows Update Agent setup package requires a reboot to complete installation. -. - -MessageId = 0xD00F -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SETUP_HANDLER_EXEC_FAILURE -Language = English -Windows Update Agent could not be updated because the setup handler failed during execution. -. - -MessageId = 0xD010 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SETUP_INVALID_REGISTRY_DATA -Language = English -Windows Update Agent could not be updated because the registry contains invalid information. -. - -MessageId = 0xD011 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SELFUPDATE_REQUIRED -Language = English -Windows Update Agent must be updated before search can continue. -. - -MessageId = 0xD012 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SELFUPDATE_REQUIRED_ADMIN -Language = English -Windows Update Agent must be updated before search can continue. An administrator is required to perform the operation. -. - -MessageId = 0xD013 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SETUP_WRONG_SERVER_VERSION -Language = English -Windows Update Agent could not be updated because the server does not contain update information for this version. -. - -MessageId = 0xD014 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SETUP_DEFERRABLE_REBOOT_PENDING -Language = English -Windows Update Agent is successfully updated, but a reboot is required to complete the setup. -. - -MessageId = 0xD015 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SETUP_NON_DEFERRABLE_REBOOT_PENDING -Language = English -Windows Update Agent is successfully updated, but a reboot is required to complete the setup. -. - -MessageId = 0xD016 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SETUP_FAIL -Language = English -Windows Update Agent could not be updated because of an unknown error. -. - -MessageId = 0xDFFF -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SETUP_UNEXPECTED -Language = English -Windows Update Agent could not be updated because of an error not covered by another WU_E_SETUP_* error code. -. - -;////////////////////////////////////////////////////////////////////////////// -;// expression evaluator errors -;/////////////////////////////////////////////////////////////////////////////// -MessageId = 0xE001 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_EE_UNKNOWN_EXPRESSION -Language = English -An expression evaluator operation could not be completed because an expression was unrecognized. -. - -MessageId = 0xE002 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_EE_INVALID_EXPRESSION -Language = English -An expression evaluator operation could not be completed because an expression was invalid. -. - -MessageId = 0xE003 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_EE_MISSING_METADATA -Language = English -An expression evaluator operation could not be completed because an expression contains an incorrect number of metadata nodes. -. - -MessageId = 0xE004 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_EE_INVALID_VERSION -Language = English -An expression evaluator operation could not be completed because the version of the serialized expression data is invalid. -. - -MessageId = 0xE005 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_EE_NOT_INITIALIZED -Language = English -The expression evaluator could not be initialized. -. - -MessageId = 0xE006 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_EE_INVALID_ATTRIBUTEDATA -Language = English -An expression evaluator operation could not be completed because there was an invalid attribute. -. - -MessageId = 0xE007 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_EE_CLUSTER_ERROR -Language = English -An expression evaluator operation could not be completed because the cluster state of the computer could not be determined. -. - -MessageId = 0xEFFF -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_EE_UNEXPECTED -Language = English -There was an expression evaluator error not covered by another WU_E_EE_* error code. -. - -;////////////////////////////////////////////////////////////////////////////// -;// UI errors -;/////////////////////////////////////////////////////////////////////////////// -MessageId = 0x3001 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INSTALLATION_RESULTS_UNKNOWN_VERSION -Language = English -The results of download and installation could not be read from the registry due to an unrecognized data format version. -. - -MessageId = 0x3002 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INSTALLATION_RESULTS_INVALID_DATA -Language = English -The results of download and installation could not be read from the registry due to an invalid data format. -. - -MessageId = 0x3003 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INSTALLATION_RESULTS_NOT_FOUND -Language = English -The results of download and installation are not available; the operation may have failed to start. -. - -MessageId = 0x3004 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_TRAYICON_FAILURE -Language = English -A failure occurred when trying to create an icon in the taskbar notification area. -. - -MessageId = 0x3FFD -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_NON_UI_MODE -Language = English -Unable to show UI when in non-UI mode; WU client UI modules may not be installed. -. - -MessageId = 0x3FFE -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_WUCLTUI_UNSUPPORTED_VERSION -Language = English -Unsupported version of WU client UI exported functions. -. - -MessageId = 0x3FFF -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_AUCLIENT_UNEXPECTED -Language = English -There was a user interface error not covered by another WU_E_AUCLIENT_* error code. -. - -;////////////////////////////////////////////////////////////////////////////// -;// reporter errors -;/////////////////////////////////////////////////////////////////////////////// -MessageId = 0xF001 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_REPORTER_EVENTCACHECORRUPT -Language = English -The event cache file was defective. -. - -MessageId = 0xF002 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_REPORTER_EVENTNAMESPACEPARSEFAILED -Language = English -The XML in the event namespace descriptor could not be parsed. -. - -MessageId = 0xF003 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INVALID_EVENT -Language = English -The XML in the event namespace descriptor could not be parsed. -. - -MessageId = 0xF004 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SERVER_BUSY -Language = English -The server rejected an event because the server was too busy. -. - -MessageId = 0xF005 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_CALLBACK_COOKIE_NOT_FOUND -Language = English -The specified callback cookie is not found. -. - -MessageId = 0xFFFF -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_REPORTER_UNEXPECTED -Language = English -There was a reporter error not covered by another error code. -. - -MessageId = 0x7001 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_OL_INVALID_SCANFILE -Language = English -An operation could not be completed because the scan package was invalid. -. - -MessageId = 0x7002 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_OL_NEWCLIENT_REQUIRED -Language = English -An operation could not be completed because the scan package requires a greater version of the Windows Update Agent. -. - -MessageId = 0x7003 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INVALID_EVENT_PAYLOAD -Language = English -An invalid event payload was specified. -. - -MessageId = 0x7004 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_INVALID_EVENT_PAYLOADSIZE -Language = English -The size of the event payload submitted is invalid. -. - -MessageId = 0x7005 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SERVICE_NOT_REGISTERED -Language = English -The service is not registered. -. - -MessageId = 0x7FFF -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_OL_UNEXPECTED -Language = English -Search using the scan package failed. -. - -;////////////////////////////////////////////////////////////////////////////// -;// WU Metadata Integrity related errors - 0x71FE -;/////////////////////////////////////////////////////////////////////////////// -;/////// -;// Metadata General errors 0x7100 - 0x711F -;/////// -MessageId = 0x7100 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_NOOP -Language = English -No operation was required by update metadata verification. -. - -MessageId = 0x7101 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_CONFIG_INVALID_BINARY_ENCODING -Language = English -The binary encoding of metadata config data was invalid. -. - -MessageId = 0x7102 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_FETCH_CONFIG -Language = English -Unable to fetch required configuration for metadata signature verification. -. - -MessageId = 0x7104 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_INVALID_PARAMETER -Language = English -A metadata verification operation failed due to an invalid parameter. -. - -MessageId = 0x7105 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_UNEXPECTED -Language = English -A metadata verification operation failed due to reasons not covered by another error code. -. - -MessageId = 0x7106 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_NO_VERIFICATION_DATA -Language = English -None of the update metadata had verification data, which may be disabled on the update server. -. - -MessageId = 0x7107 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_BAD_FRAGMENTSIGNING_CONFIG -Language = English -The fragment signing configuration used for verifying update metadata signatures was bad. -. - -MessageId = 0x7108 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_FAILURE_PROCESSING_FRAGMENTSIGNING_CONFIG -Language = English -There was an unexpected operational failure while parsing fragment signing configuration. -. - -;/////// -;// Metadata XML errors 0x7120 - 0x713F -;/////// -MessageId = 0x7120 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_XML_MISSING -Language = English -Required xml data was missing from configuration. -. - -MessageId = 0x7121 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_XML_FRAGMENTSIGNING_MISSING -Language = English -Required fragmentsigning data was missing from xml configuration. -. - -MessageId = 0x7122 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_XML_MODE_MISSING -Language = English -Required mode data was missing from xml configuration. -. - -MessageId = 0x7123 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_XML_MODE_INVALID -Language = English -An invalid metadata enforcement mode was detected. -. - -MessageId = 0x7124 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_XML_VALIDITY_INVALID -Language = English -An invalid timestamp validity window configuration was detected. -. - -MessageId = 0x7125 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_XML_LEAFCERT_MISSING -Language = English -Required leaf certificate data was missing from xml configuration. -. - -MessageId = 0x7126 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_XML_INTERMEDIATECERT_MISSING -Language = English -Required intermediate certificate data was missing from xml configuration. -. - -MessageId = 0x7127 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_XML_LEAFCERT_ID_MISSING -Language = English -Required leaf certificate id attribute was missing from xml configuration. -. - -MessageId = 0x7128 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_XML_BASE64CERDATA_MISSING -Language = English -Required certificate base64CerData attribute was missing from xml configuration. -. - -;/////// -;// Metadata Signature/Hash-related errors 0x7140 - 0x714F -;/////// -MessageId = 0x7140 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_BAD_SIGNATURE -Language = English -The metadata for an update was found to have a bad or invalid digital signature. -. - -MessageId = 0x7141 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_UNSUPPORTED_HASH_ALG -Language = English -An unsupported hash algorithm for metadata verification was specified. -. - -MessageId = 0x7142 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_SIGNATURE_VERIFY_FAILED -Language = English -An error occurred during an update's metadata signature verification. -. - -;/////// -;// Metadata Certificate Chain trust related errors 0x7150 - 0x715F -;/////// -MessageId = 0x7150 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATATRUST_CERTIFICATECHAIN_VERIFICATION -Language = English -An failure occurred while verifying trust for metadata signing certificate chains. -. - -MessageId = 0x7151 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATATRUST_UNTRUSTED_CERTIFICATECHAIN -Language = English -A metadata signing certificate had an untrusted certificate chain. -. - -;/////// -;// Metadata Timestamp Token/Signature errors 0x7160 - 0x717F -;/////// -MessageId = 0x7160 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_TIMESTAMP_TOKEN_MISSING -Language = English -An expected metadata timestamp token was missing. -. - -MessageId = 0x7161 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_TIMESTAMP_TOKEN_VERIFICATION_FAILED -Language = English -A metadata Timestamp token failed verification. -. - -MessageId = 0x7162 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_TIMESTAMP_TOKEN_UNTRUSTED -Language = English -A metadata timestamp token signer certificate chain was untrusted. -. - -MessageId = 0x7163 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_TIMESTAMP_TOKEN_VALIDITY_WINDOW -Language = English -A metadata signature timestamp token was no longer within the validity window. -. - -MessageId = 0x7164 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_TIMESTAMP_TOKEN_SIGNATURE -Language = English -A metadata timestamp token failed signature validation -. - -MessageId = 0x7165 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_TIMESTAMP_TOKEN_CERTCHAIN -Language = English -A metadata timestamp token certificate failed certificate chain verification. -. - -MessageId = 0x7166 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_TIMESTAMP_TOKEN_REFRESHONLINE -Language = English -A failure occurred when refreshing a missing timestamp token from the network. -. - -MessageId = 0x7167 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_TIMESTAMP_TOKEN_ALL_BAD -Language = English -All update metadata verification timestamp tokens from the timestamp token cache are invalid. -. - -MessageId = 0x7168 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_TIMESTAMP_TOKEN_NODATA -Language = English -No update metadata verification timestamp tokens exist in the timestamp token cache. -. - -MessageId = 0x7169 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_TIMESTAMP_TOKEN_CACHELOOKUP -Language = English -An error occurred during cache lookup of update metadata verification timestamp token. -. - -MessageId = 0x717E -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_TIMESTAMP_TOKEN_VALIDITYWINDOW_UNEXPECTED -Language = English -An metadata timestamp token validity window failed unexpectedly due to reasons not covered by another error code. -. - -MessageId = 0x717F -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_TIMESTAMP_TOKEN_UNEXPECTED -Language = English -An metadata timestamp token verification operation failed due to reasons not covered by another error code. -. - -;/////// -;// Metadata Certificate-Related errors 0x7180 - 0x719F -;/////// -MessageId = 0x7180 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_CERT_MISSING -Language = English -An expected metadata signing certificate was missing. -. - -MessageId = 0x7181 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_LEAFCERT_BAD_TRANSPORT_ENCODING -Language = English -The transport encoding of a metadata signing leaf certificate was malformed. -. - -MessageId = 0x7182 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_INTCERT_BAD_TRANSPORT_ENCODING -Language = English -The transport encoding of a metadata signing intermediate certificate was malformed. -. - -MessageId = 0x7183 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_METADATA_CERT_UNTRUSTED -Language = English -A metadata certificate chain was untrusted. -. - -;////////////////////////////////////////////////////////////////////////////// -;// WU Task related errors -;/////////////////////////////////////////////////////////////////////////////// -MessageId = 0xB001 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_WUTASK_INPROGRESS -Language = English -The task is currently in progress. -. - -MessageId = 0xB002 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_WUTASK_STATUS_DISABLED -Language = English -The operation cannot be completed since the task status is currently disabled. -. - -MessageId = 0xB003 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_WUTASK_NOT_STARTED -Language = English -The operation cannot be completed since the task is not yet started. -. - -MessageId = 0xB004 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_WUTASK_RETRY -Language = English -The task was stopped and needs to be run again to complete. -. - -MessageId = 0xB005 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_WUTASK_CANCELINSTALL_DISALLOWED -Language = English -Cannot cancel a non-scheduled install. -. - -;////////////////////////////////////////////////////////////////////////////// -;// Hardware Capability related errors -;//// -MessageId = 0xB101 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UNKNOWN_HARDWARECAPABILITY -Language = English -Hardware capability meta data was not found after a sync with the service. -. - -MessageId = 0xB102 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_BAD_XML_HARDWARECAPABILITY -Language = English -Hardware capability meta data was malformed and/or failed to parse. -. - -MessageId = 0xB103 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_WMI_NOT_SUPPORTED -Language = English -Unable to complete action due to WMI dependency, which isn't supported on this platform. -. - -MessageId = 0xB104 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_UPDATE_MERGE_NOT_ALLOWED -Language = English -Merging of the update is not allowed -. - -MessageId = 0xB105 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SKIPPED_UPDATE_INSTALLATION -Language = English -Installing merged updates only. So skipping non mergeable updates. -. - -;////////////////////////////////////////////////////////////////////////////// -;// SLS related errors - 0xB201 -;//// -;/////// -;// SLS General errors 0xB201 - 0xB2FF -;/////// -MessageId = 0xB201 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_SLS_INVALID_REVISION -Language = English -SLS response returned invalid revision number. -. - -;////////////////////////////////////////////////////////////////////////////// -;// trust related errors - 0xB301 -;//// -;/////// -;// trust General errors 0xB301 - 0xB3FF -;/////// -MessageId = 0xB301 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_FILETRUST_DUALSIGNATURE_RSA -Language = English -File signature validation fails to find valid RSA signature on infrastructure payload. -. - -MessageId = 0xB302 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_FILETRUST_DUALSIGNATURE_ECC -Language = English -File signature validation fails to find valid ECC signature on infrastructure payload. -. - -MessageId = 0xB303 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_TRUST_SUBJECT_NOT_TRUSTED -Language = English -The subject is not trusted by WU for the specified action. -. - -MessageId = 0xB304 -Facility = WindowsUpdate -Severity = Error -SymbolicName = WU_E_TRUST_PROVIDER_UNKNOWN -Language = English -Unknown trust provider for WU. -. - -;#endif //_WUERROR_ diff --git a/Makefile b/Makefile deleted file mode 100644 index 845a4b5..0000000 --- a/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -export CI ?= 0 -export SIGN ?= 0 -export DEBUG ?= 1 - -all: -ifeq ($(DEBUG),0) - +$(MAKE) clean -endif - - +$(MAKE) -C LegacyUpdate - +$(MAKE) -C launcher - +$(MAKE) -C setup - -clean: - +$(MAKE) -C LegacyUpdate clean - +$(MAKE) -C launcher clean - +$(MAKE) -C setup clean - -.PHONY: all clean diff --git a/build.cmd b/build.cmd index 1e2b1d2..7774df1 100644 --- a/build.cmd +++ b/build.cmd @@ -13,9 +13,6 @@ if not exist "%ProgramFiles32%\NSIS\Bin\makensis.exe" ( exit /b 1 ) -:: Build project -call LegacyUpdate\build.cmd - :: Build NSIS makensis setup\setup.nsi if "%errorlevel%" neq "0" exit /b %errorlevel% diff --git a/build/fix-nsis.sh b/build/fix-nsis.sh deleted file mode 100644 index 6d81be7..0000000 --- a/build/fix-nsis.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash -# Fixes NSIS binaries so they run on Pentium/486. Debian's build of NSIS is compiled with MinGW, -# but they lack any -mcpu flag, so the binaries receive a default of i686. To fix this, we'll -# download the official Windows build of NSIS and extract its binaries. We only handle stubs though, -# because we provide our own plugin builds in this repo. - -set -e - -if [[ $UID != 0 ]]; then - echo "This script needs to be run as root (sorry)" >&2 - exit 1 -fi - -if [[ ! -d /usr/share/nsis/Stubs ]]; then - echo "NSIS not installed, or Stubs directory is broken" >&2 - exit 1 -fi - -if [[ -d /usr/share/nsis/Stubs_old ]]; then - echo "NSIS stubs are already fixed" >&2 - exit 0 -fi - -apt-get install -qy curl p7zip-full - -mkdir /tmp/nsis -cd /tmp/nsis - -curl -fSL https://prdownloads.sourceforge.net/nsis/NSIS%203/3.10/nsis-3.10-setup.exe -o nsis.exe -7z x nsis.exe - -mv /usr/share/nsis/Stubs{,_old} -cp -ra Stubs /usr/share/nsis/Stubs - -rm -rf /tmp/nsis diff --git a/build/fix-vc08-aslr.reg b/build/fix-vc08-aslr.reg deleted file mode 100644 index a5fa7e1c7f8e59ea762ec890c785fc9d1a535416..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1408 zcmds%+fGwK7=_n0Pci8gL?lp)R*V-|+h`DKKq1C$NGaX5NxMsS+qA^^>fpC#wx*2_ zU}7e7_)ly8)6C<;l}0LbtErZnDd=1S4dKl+SE+kAZKNZpDRj^!@)GF?x_~~^p7t4A zj91Waqis(&8lxF>tP6brH7NgsVDyE0Xau$Ngb`GaC{0d%_hpC z?MYdowsfE--n>Mo26_<@?pXWi4~QY?4sFv@O*oIDhvt8W+e5>6A+8B^7s`=ZdmM9N z`!b>z@Cz~(K)1d9UdJ`k1f3z$Ip>`7s?v7+$(w1FrwKl%SX+4FygEBG5Ca-UPxdK} zC0M>S=tOUb_=TP`4w*sQ$a403Y!~eP3eWbgbBMM(v0h*G4urP8=$aaJsl_q-wNBYv z$lmJ=X+{OR>gbcM;Gaj%DJcDzd;6H$=3isjpB-z@Lm(~5`>cdhz@a={x4By`a$N? zyUFQ+Tjo<&2 - exit /b 1 -) - -endlocal & set "vcvarsall=%vcvarsall%" -call "%vcvarsall%" %* >nul diff --git a/build/sign.cmd b/build/sign.cmd deleted file mode 100644 index 238e176..0000000 --- a/build/sign.cmd +++ /dev/null @@ -1,10 +0,0 @@ -@echo off -setlocal enabledelayedexpansion - -:: Find Visual Studio installation -call %~dp0getvc.cmd x64 - -:: Sign -signtool sign /n "Hashbang Productions" /tr http://time.certum.pl/ /fd SHA1 /td SHA256 /v %* -signtool sign /n "Hashbang Productions" /tr http://time.certum.pl/ /fd SHA256 /td SHA256 /as /v %* -if "%errorlevel%" neq "0" exit /b %errorlevel% diff --git a/build/sign.sh b/build/sign.sh deleted file mode 100644 index 25c0dd8..0000000 --- a/build/sign.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -args=("$(wslpath -w "$(dirname "$0")/sign.cmd")") -for arg in "$@"; do - case "$arg" in - */*) args+=("$(wslpath -w "$arg")") ;; - *) args+=("$arg") ;; - esac -done -exec cmd.exe /c "${args[@]}" diff --git a/nsisplugin/CloseIEWindows.c b/nsisplugin/CloseIEWindows.c deleted file mode 100644 index 4299942..0000000 --- a/nsisplugin/CloseIEWindows.c +++ /dev/null @@ -1,64 +0,0 @@ -#include -#include -#include - -const LPWSTR LegacyUpdateSiteURLHttp = L"http://legacyupdate.net/"; -const LPWSTR LegacyUpdateSiteURLHttps = L"https://legacyupdate.net/"; - -PLUGIN_METHOD(CloseIEWindows) { - PLUGIN_INIT(); - - // Find and close IE windows that might have the ActiveX control loaded - IShellWindows *windows; - HRESULT hr = CoCreateInstance(&CLSID_ShellWindows, NULL, CLSCTX_ALL, &IID_IShellWindows, (void **)&windows); - if (!SUCCEEDED(hr)) { - goto end; - } - - long count; - hr = IShellWindows_get_Count(windows, &count); - if (!SUCCEEDED(hr)) { - goto end; - } - - VARIANT index = {0}; - index.vt = VT_I4; - - for (long i = 0; i <= count; i++) { - IDispatch *item; - index.lVal = i; - - hr = IShellWindows_Item(windows, index, &item); - if (!SUCCEEDED(hr) || !item) { - continue; - } - - IWebBrowser2 *browser; - hr = IDispatch_QueryInterface(item, &IID_IWebBrowser2, (void **)&browser); - IDispatch_Release(item); - if (!SUCCEEDED(hr)) { - continue; - } - - BSTR location; - hr = IWebBrowser2_get_LocationURL(browser, &location); - if (!SUCCEEDED(hr)) { - IWebBrowser2_Release(browser); - continue; - } - - if (wcsstr(location, LegacyUpdateSiteURLHttp) != NULL || wcsstr(location, LegacyUpdateSiteURLHttps) != NULL) { - hr = IWebBrowser2_Quit(browser); - } - - SysFreeString(location); - IWebBrowser2_Release(browser); - } - -end: - if (windows) { - IShellWindows_Release(windows); - } - - pushint(hr); -} diff --git a/nsisplugin/DialogInit.c b/nsisplugin/DialogInit.c deleted file mode 100644 index 7562090..0000000 --- a/nsisplugin/DialogInit.c +++ /dev/null @@ -1,377 +0,0 @@ -#include "stdafx.h" - -#undef _WIN32_WINNT -#define _WIN32_WINNT _WIN32_WINNT_VISTA - -#include -#include -#include -#include -#include -#include -#include "main.h" -#include "LoadImage.h" -#include "Registry.h" -#include "VersionInfo.h" - -#ifndef WM_DWMCOMPOSITIONCHANGED -#define WM_DWMCOMPOSITIONCHANGED 0x031e -#endif - -#define DWMWA_USE_IMMERSIVE_DARK_MODE_BEFORE_20H1 19 -#define DWMWA_USE_IMMERSIVE_DARK_MODE 20 -#define DWMWA_CAPTION_COLOR 35 -#define DWMWA_SYSTEMBACKDROP_TYPE 38 -#define DWMWA_COLOR_NONE 0xFFFFFFFE -#define DWMSBT_MAINWINDOW 2 - -#define IDI_BANNER_WORDMARK_LIGHT 1337 -#define IDI_BANNER_WORDMARK_DARK 1338 -#define IDI_BANNER_WORDMARK_GLOW 1339 - -typedef HRESULT (WINAPI *_DwmExtendFrameIntoClientArea)(HWND hWnd, const MARGINS *pMarInset); -typedef HRESULT (WINAPI *_DwmIsCompositionEnabled)(BOOL *pfEnabled); -typedef HRESULT (WINAPI *_DwmDefWindowProc)(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, LRESULT *plResult); -typedef HRESULT (WINAPI *_DwmSetWindowAttribute)(HWND hwnd, DWORD dwAttribute, LPCVOID pvAttribute, DWORD cbAttribute); -typedef HRESULT (WINAPI *_SetWindowThemeAttribute)(HWND hwnd, enum WINDOWTHEMEATTRIBUTETYPE eAttribute, PVOID pvAttribute, DWORD cbAttribute); -typedef BOOL (WINAPI *_IsThemeActive)(); -typedef HTHEME (WINAPI *_OpenThemeData)(HWND hwnd, LPCWSTR pszClassList); -typedef HRESULT (WINAPI *_CloseThemeData)(HTHEME hTheme); -typedef HRESULT (WINAPI *_DrawThemeBackground)(HTHEME hTheme, HDC hdc, int iPartId, int iStateId, const RECT *pRect, const RECT *pClipRect); - -static _DwmExtendFrameIntoClientArea $DwmExtendFrameIntoClientArea; -static _DwmIsCompositionEnabled $DwmIsCompositionEnabled; -static _DwmDefWindowProc $DwmDefWindowProc; -static _DwmSetWindowAttribute $DwmSetWindowAttribute; -static _SetWindowThemeAttribute $SetWindowThemeAttribute; -static _IsThemeActive $IsThemeActive; -static _OpenThemeData $OpenThemeData; -static _CloseThemeData $CloseThemeData; -static _DrawThemeBackground $DrawThemeBackground; - -typedef enum Theme { - ThemeUnknown = -1, - ThemeClassic, - ThemeBasic, - ThemeAeroLight, - ThemeAeroDark -} Theme; - -static HBITMAP g_bannerWordmark; -static HBITMAP g_bannerWordmarkGlow; -static HTHEME g_aeroTheme; -static Theme g_theme = ThemeUnknown; - -static WNDPROC g_dialogOrigWndProc; -static WNDPROC g_bannerOrigWndProc; -static WNDPROC g_bottomOrigWndProc; - -static Theme GetTheme() { - BOOL enabled; - if (!$DwmIsCompositionEnabled || !$IsThemeActive || !SUCCEEDED($DwmIsCompositionEnabled(&enabled))) { - return ThemeClassic; - } - - if (enabled) { - DWORD light = 1; - if (AtLeastWin10_1809()) { - GetRegistryDword(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", L"AppsUseLightTheme", 0, &light); - } - return light ? ThemeAeroLight : ThemeAeroDark; - } - - return $IsThemeActive() ? ThemeBasic : ThemeClassic; -} - -static void ConfigureWindow() { - HWND bannerWindow = GetDlgItem(g_hwndParent, 1046); - HWND bannerDivider = GetDlgItem(g_hwndParent, 1047); - HWND bottomDivider = GetDlgItem(g_hwndParent, 6900); - if (!bannerWindow || !bannerDivider || !bottomDivider) { - return; - } - - Theme theme = GetTheme(); - if (g_theme != theme) { - g_theme = theme; - MARGINS margins = {0}; - - if (theme >= ThemeAeroLight) { - // Set glass area - RECT rect; - GetWindowRect(bannerWindow, &rect); - margins.cyTopHeight = rect.bottom - rect.top; - } - - if ($DwmExtendFrameIntoClientArea) { - $DwmExtendFrameIntoClientArea(g_hwndParent, &margins); - } - - ShowWindow(bannerDivider, theme >= ThemeBasic ? SW_HIDE : SW_SHOW); - ShowWindow(bottomDivider, theme >= ThemeBasic ? SW_HIDE : SW_SHOW); - - if (g_theme >= ThemeBasic) { - DWORD wordmark = g_theme == ThemeAeroDark ? IDI_BANNER_WORDMARK_DARK : IDI_BANNER_WORDMARK_LIGHT; - g_bannerWordmark = LoadPNGResource(NULL, MAKEINTRESOURCE(wordmark), L"PNG"); - if (g_theme >= ThemeAeroLight && AtMostWin7()) { - g_bannerWordmarkGlow = LoadPNGResource(NULL, MAKEINTRESOURCE(IDI_BANNER_WORDMARK_GLOW), L"PNG"); - } - } else { - DeleteObject(g_bannerWordmark); - DeleteObject(g_bannerWordmarkGlow); - g_bannerWordmark = NULL; - g_bannerWordmarkGlow = NULL; - } - - // Set dark mode state - if (AtLeastWin10_1809() && $DwmSetWindowAttribute) { - DWORD attr = AtLeastWin10_2004() ? DWMWA_USE_IMMERSIVE_DARK_MODE : DWMWA_USE_IMMERSIVE_DARK_MODE_BEFORE_20H1; - DWORD value = g_theme == ThemeAeroDark; - $DwmSetWindowAttribute(g_hwndParent, attr, &value, sizeof(value)); - } - } -} - -static LRESULT CALLBACK BannerWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - if (g_theme < ThemeBasic) { - return CallWindowProc(g_bannerOrigWndProc, hwnd, uMsg, wParam, lParam); - } - - switch (uMsg) { - case WM_PAINT: { - PAINTSTRUCT ps; - HDC hdc = BeginPaint(hwnd, &ps); - RECT rect; - GetClientRect(hwnd, &rect); - - // Draw base color for glass area - FillRect(hdc, &rect, GetStockObject(BLACK_BRUSH)); - - // Draw Aero Basic titlebar - if (g_theme == ThemeBasic && g_aeroTheme && $DrawThemeBackground) { - int state = GetActiveWindow() == g_hwndParent ? AW_S_TITLEBAR_ACTIVE : AW_S_TITLEBAR_INACTIVE; - $DrawThemeBackground(g_aeroTheme, hdc, AW_TITLEBAR, state, &rect, NULL); - } - - float scale = (float)GetDeviceCaps(hdc, LOGPIXELSX) / 96.0f; - - BLENDFUNCTION blendFunc; - blendFunc.BlendOp = AC_SRC_OVER; - blendFunc.BlendFlags = 0; - blendFunc.SourceConstantAlpha = 0xFF; - blendFunc.AlphaFormat = AC_SRC_ALPHA; - - // Draw wordmark with alpha blending - if (g_bannerWordmarkGlow) { - HDC hdcMem = CreateCompatibleDC(hdc); - HBITMAP hbmOld = (HBITMAP)SelectObject(hdcMem, g_bannerWordmarkGlow); - - BITMAP bitmap; - GetObject(g_bannerWordmarkGlow, sizeof(bitmap), &bitmap); - - LONG width = bitmap.bmWidth * scale; - LONG height = bitmap.bmHeight * scale; - LONG x = (rect.right - rect.left - width) / 2; - LONG y = (rect.bottom - rect.top - height) / 2; - - SetStretchBltMode(hdc, HALFTONE); - AlphaBlend(hdc, - x, y, width, height, hdcMem, - 0, 0, bitmap.bmWidth, bitmap.bmHeight, blendFunc); - - SelectObject(hdcMem, hbmOld); - DeleteDC(hdcMem); - } - - if (g_bannerWordmark) { - HDC hdcMem = CreateCompatibleDC(hdc); - HBITMAP hbmOld = (HBITMAP)SelectObject(hdcMem, g_bannerWordmark); - - BITMAP bitmap; - GetObject(g_bannerWordmark, sizeof(bitmap), &bitmap); - - LONG width = bitmap.bmWidth * scale; - LONG height = bitmap.bmHeight * scale; - LONG x = (rect.right - rect.left - width) / 2; - LONG y = ((rect.bottom - rect.top - height) / 2) - (1 * scale); - - SetStretchBltMode(hdc, HALFTONE); - AlphaBlend(hdc, - x, y, width, height, hdcMem, - 0, 0, bitmap.bmWidth, bitmap.bmHeight, blendFunc); - - SelectObject(hdcMem, hbmOld); - DeleteDC(hdcMem); - } - - EndPaint(hwnd, &ps); - return 0; - } - - case WM_ERASEBKGND: - return DefWindowProc(hwnd, uMsg, wParam, lParam); - - case WM_NCHITTEST: - // Pass through to parent - return HTTRANSPARENT; - } - - if (!g_bannerOrigWndProc) { - return 0; - } - - return CallWindowProc(g_bannerOrigWndProc, hwnd, uMsg, wParam, lParam); -} - -static LRESULT CALLBACK BottomWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - switch (uMsg) { - case WM_PAINT: { - // Draw command area background (grey with divider line) - if (g_theme < ThemeBasic || !g_aeroTheme || !$DrawThemeBackground) { - break; - } - - PAINTSTRUCT ps; - HDC hdc = BeginPaint(hwnd, &ps); - - RECT rect; - GetClientRect(hwnd, &rect); - $DrawThemeBackground(g_aeroTheme, hdc, AW_COMMANDAREA, 0, &rect, NULL); - - EndPaint(hwnd, &ps); - return 0; - } - } - - if (!g_bottomOrigWndProc) { - return 0; - } - - return CallWindowProc(g_bottomOrigWndProc, hwnd, uMsg, wParam, lParam); -} - -static LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - if (g_theme >= ThemeAeroLight && $DwmDefWindowProc) { - LRESULT lRet = 0; - if ($DwmDefWindowProc(hwnd, uMsg, wParam, lParam, &lRet)) { - return lRet; - } - } - - switch (uMsg) { - case WM_THEMECHANGED: - case WM_DWMCOMPOSITIONCHANGED: - ConfigureWindow(); - break; - - case WM_ACTIVATE: - case WM_NCACTIVATE: - // Redraw banner on activation - if (g_theme == ThemeBasic) { - InvalidateRect(GetDlgItem(hwnd, 1046), NULL, FALSE); - } - break; - - case WM_NCHITTEST: { - if (g_theme < ThemeBasic) { - break; - } - - // Allow drag in the header area - HWND bannerWindow = GetDlgItem(hwnd, 1046); - if (!bannerWindow) { - break; - } - - POINT hit = {GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam)}; - ScreenToClient(hwnd, &hit); - - RECT rect; - GetWindowRect(bannerWindow, &rect); - rect.right -= rect.left; - rect.bottom -= rect.top; - rect.left = 0; - rect.top = 0; - - if (PtInRect(&rect, hit)) { - return HTCAPTION; - } - break; - } - } - - if (!g_dialogOrigWndProc) { - return 0; - } - - return CallWindowProc(g_dialogOrigWndProc, hwnd, uMsg, wParam, lParam); -} - -static UINT_PTR NSISPluginCallback(enum NSPIM event) { - // Does nothing, but keeping a callback registered prevents NSIS from unloading the plugin - return 0; -} - -PLUGIN_METHOD(DialogInit) { - PLUGIN_INIT(); - - if (g_dialogOrigWndProc) { - return; - } - - extra->RegisterPluginCallback(g_hInstance, NSISPluginCallback); - - // Get symbols - HMODULE dwmapi = LoadLibrary(L"dwmapi.dll"); - if (dwmapi) { - $DwmExtendFrameIntoClientArea = (_DwmExtendFrameIntoClientArea)GetProcAddress(dwmapi, "DwmExtendFrameIntoClientArea"); - $DwmIsCompositionEnabled = (_DwmIsCompositionEnabled)GetProcAddress(dwmapi, "DwmIsCompositionEnabled"); - $DwmDefWindowProc = (_DwmDefWindowProc)GetProcAddress(dwmapi, "DwmDefWindowProc"); - $DwmSetWindowAttribute = (_DwmSetWindowAttribute)GetProcAddress(dwmapi, "DwmSetWindowAttribute"); - } - - HMODULE uxtheme = LoadLibrary(L"uxtheme.dll"); - if (uxtheme) { - $SetWindowThemeAttribute = (_SetWindowThemeAttribute)GetProcAddress(uxtheme, "SetWindowThemeAttribute"); - $IsThemeActive = (_IsThemeActive)GetProcAddress(uxtheme, "IsThemeActive"); - $OpenThemeData = (_OpenThemeData)GetProcAddress(uxtheme, "OpenThemeData"); - $CloseThemeData = (_CloseThemeData)GetProcAddress(uxtheme, "CloseThemeData"); - $DrawThemeBackground = (_DrawThemeBackground)GetProcAddress(uxtheme, "DrawThemeBackground"); - } - - // Get AeroWizard theme - if ($OpenThemeData) { - g_aeroTheme = $OpenThemeData(g_hwndParent, L"AeroWizard"); - } - - // Hide title caption/icon - if ($SetWindowThemeAttribute) { - WTA_OPTIONS options; - options.dwFlags = WTNCA_NODRAWCAPTION | WTNCA_NODRAWICON; - options.dwMask = WTNCA_NODRAWCAPTION | WTNCA_NODRAWICON; - $SetWindowThemeAttribute(g_hwndParent, WTA_NONCLIENT, &options, sizeof(options)); - } - - // Enable Acrylic blur - if (AtLeastWin11_21H1() && $DwmSetWindowAttribute) { - // I stole this undocumented 1029 attr from Microsoft Store's StoreInstaller.exe - BOOL modern = AtLeastWin11_22H2(); - DWORD attr = modern ? DWMWA_SYSTEMBACKDROP_TYPE : 1029; - DWORD value = modern ? DWMSBT_MAINWINDOW : 1; - $DwmSetWindowAttribute(g_hwndParent, attr, &value, sizeof(value)); - - // Hide caption background - value = DWMWA_COLOR_NONE; - $DwmSetWindowAttribute(g_hwndParent, DWMWA_CAPTION_COLOR, &value, sizeof(value)); - } - - // Set up extended client frame - ConfigureWindow(); - - // Set up window procedures - HWND bannerWindow = GetDlgItem(g_hwndParent, 1046); - HWND bottomWindow = GetDlgItem(g_hwndParent, 6901); - g_dialogOrigWndProc = (WNDPROC)SetWindowLongPtr(g_hwndParent, GWLP_WNDPROC, (LONG_PTR)MainWndProc); - g_bannerOrigWndProc = (WNDPROC)SetWindowLongPtr(bannerWindow, GWLP_WNDPROC, (LONG_PTR)BannerWndProc); - g_bottomOrigWndProc = (WNDPROC)SetWindowLongPtr(bottomWindow, GWLP_WNDPROC, (LONG_PTR)BottomWndProc); -} diff --git a/nsisplugin/EnableMicrosoftUpdate.c b/nsisplugin/EnableMicrosoftUpdate.c deleted file mode 100644 index 262ef54..0000000 --- a/nsisplugin/EnableMicrosoftUpdate.c +++ /dev/null @@ -1,35 +0,0 @@ -#include -#include -#include -#include "main.h" - -static const LPWSTR MicrosoftUpdateServiceID = L"7971f918-a847-4430-9279-4a52d1efe18d"; - -PLUGIN_METHOD(EnableMicrosoftUpdate) { - PLUGIN_INIT(); - - IUpdateServiceManager2 *serviceManager; - IUpdateServiceRegistration *registration; - - HRESULT hr = CoCreateInstance(&CLSID_UpdateServiceManager, NULL, CLSCTX_INPROC_SERVER, &IID_IUpdateServiceManager2, (void **)&serviceManager); - if (!SUCCEEDED(hr)) { - goto end; - } - - BSTR serviceID = SysAllocString(MicrosoftUpdateServiceID); - BSTR serviceCab = SysAllocString(L""); - hr = IUpdateServiceManager2_AddService2(serviceManager, serviceID, asfAllowPendingRegistration | asfAllowOnlineRegistration | asfRegisterServiceWithAU, serviceCab, ®istration); - SysFreeString(serviceID); - SysFreeString(serviceCab); - -end: - if (registration) { - IUpdateServiceManager2_Release(registration); - } - - if (serviceManager) { - IUpdateServiceManager2_Release(serviceManager); - } - - pushint(hr); -} diff --git a/nsisplugin/Exec.c b/nsisplugin/Exec.c deleted file mode 100644 index b77f484..0000000 --- a/nsisplugin/Exec.c +++ /dev/null @@ -1,602 +0,0 @@ -/* -Copyright (C) 2002 Robert Rainwater -Copyright (C) 2002-2023 Nullsoft and Contributors - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - -*/ -#include -#include -#include -#include // nsis plugin -#include "main.h" - -#if defined(_MSC_VER) && !defined(GetVersion) -#if _MSC_VER >= 1500 -FORCEINLINE DWORD NoDepr_GetVersion() { __pragma(warning(push))__pragma(warning(disable:4996)) DWORD r = GetVersion(); __pragma(warning(pop)) return r; } -#define GetVersion NoDepr_GetVersion -#endif //~ _MSC_VER >= 1500 -#endif //~ _MSC_VER - -#define TAB_REPLACE _T(" ") -#define TAB_REPLACE_SIZE (sizeof(TAB_REPLACE) - sizeof(_T(""))) -#define TAB_REPLACE_CCH (TAB_REPLACE_SIZE / sizeof(_T(""))) -enum { MODE_IGNOREOUTPUT = 0, MODE_LINES = 1, MODE_STACK = 2 }; - -#define LOOPTIMEOUT 100 -static HWND g_hwndList; - -static void ExecScript(BOOL log); -static TCHAR *my_strstr(TCHAR *a, TCHAR *b); -static unsigned int my_atoi(TCHAR *s); -static int WINAPI AsExeWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow); - -PLUGIN_METHOD(Exec) { - PLUGIN_INIT(); - ExecScript(MODE_IGNOREOUTPUT); -} - -PLUGIN_METHOD(ExecToLog) { - PLUGIN_INIT(); - ExecScript(extra->exec_flags->status_update & 1 ? MODE_LINES : MODE_IGNOREOUTPUT); -} - -PLUGIN_METHOD(ExecToStack) { - PLUGIN_INIT(); - ExecScript(MODE_STACK); -} - -static BOOL IsLeadSurrogateUTF16(unsigned short c) { return c >= 0xd800 && c <= 0xdbff; } -static BOOL IsTrailSurrogateUTF16(unsigned short c) { return c >= 0xdc00 && c <= 0xdfff; } - -static PWSTR MyCharNext(PCWSTR p) -{ - // Note: This is wrong for surrogate pair combining characters but CharNextW does - // not support surrogate pairs correctly so we have to manually handle the pairs. - if (!p[0]) return (PWSTR) p; - if (IsLeadSurrogateUTF16(p[0]) && IsTrailSurrogateUTF16(p[1])) return (PWSTR) p + 2; // Current is a surrogate pair, we incorrectly assume that it is not followed by combining characters. - if (IsLeadSurrogateUTF16(p[1]) && IsTrailSurrogateUTF16(p[2])) return (PWSTR) p + 1; // Next is a surrogate pair, we incorrectly assume that it is not a combining character for the current character. - return (CharNextW)(p); -} -#define CharNextW MyCharNext - -static void TruncateStringUTF16LE(LPWSTR Buffer, SIZE_T Length, LPCWSTR Overflow, SIZE_T lenOver) { - if (Length) { - LPWSTR p = &Buffer[Length - 1]; - UINT stripBaseCharIfCuttingCombining = TRUE; - - // CharNextW is buggy on XP&2003 but we don't care enough to call GetStringTypeW (http://archives.miloush.net/michkap/archive/2005/01/30/363420.html) - if (stripBaseCharIfCuttingCombining && lenOver) { - WCHAR buf[] = { *p, Overflow[0], lenOver > 1 ? Overflow[1] : L' ', L'\0' }; - for (;;) { - BOOL comb = CharNextW(buf) > buf + 1; - if (!comb || p < Buffer) break; - *((WORD*)((BYTE*)&buf[1])) = *((WORD*)((BYTE*)&buf[0])); - buf[0] = *p; - *p-- = L'\0'; - } - } - - if (IsLeadSurrogateUTF16(*p)) { - *p = L'\0'; // Avoid incomplete pair - } - } -} - -static void TruncateStringMB(UINT Codepage, LPSTR Buffer, SIZE_T Length, unsigned short OverflowCh) { - if (Length) { - CHAR *p = &Buffer[Length - 1], buf[] = { *p, ' ', ' ', '\0' }; - - if (CharNextExA(Codepage, buf, 0) > buf + 1) { // Remove incomplete DBCS character? - *p = '\0'; - } - } -} - -static BOOL IsWOW64() { -#ifdef _WIN64 - return FALSE; -#else - typedef BOOL (WINAPI*ISWOW64PROCESS)(HANDLE, BOOL*); - ISWOW64PROCESS pfIsWow64Process; - typedef BOOL (WINAPI*ISWOW64PROCESS2)(HANDLE, USHORT*, USHORT*); - ISWOW64PROCESS2 pfIsWow64Process2; - HANDLE hProcess = GetCurrentProcess(); - HMODULE hK32 = GetModuleHandleA("KERNEL32"); - UINT_PTR retval; - USHORT appmach, image_file_machine_unknown = 0; - CHAR funcnam[16] -#if defined(_MSC_VER) && (_MSC_VER-0 <= 1400) - = "IsWow64Process2"; // MOVSD * 4 -#else - ; lstrcpyA(funcnam, "IsWow64Process2"); -#endif - pfIsWow64Process2 = (ISWOW64PROCESS2) GetProcAddress(hK32, funcnam); - if (pfIsWow64Process2 && pfIsWow64Process2(hProcess, &appmach, NULL)) { - retval = image_file_machine_unknown != appmach; - } - else { - BOOL wow64; - pfIsWow64Process = (ISWOW64PROCESS) GetProcAddress(hK32, (funcnam[14] = '\0', funcnam)); - retval = (UINT_PTR) pfIsWow64Process; - if (pfIsWow64Process && (retval = pfIsWow64Process(hProcess, &wow64))) { - retval = wow64; - } - } - return (BOOL) (UINT) retval; -#endif -} - -// Tim Kosse's LogMessage -#ifdef UNICODE -static void LogMessage(const TCHAR *pStr, BOOL bOEM) { -#else -static void LogMessage(TCHAR *pStr, BOOL bOEM) { -#endif - LVITEM item; - int nItemCount; - if (!g_hwndList) return; - //if (!*pStr) return; -#ifndef UNICODE - if (bOEM == TRUE) OemToCharBuff(pStr, pStr, lstrlen(pStr)); -#endif - nItemCount=(int) SendMessage(g_hwndList, LVM_GETITEMCOUNT, 0, 0); - item.mask=LVIF_TEXT; - item.pszText=(TCHAR *)pStr; - item.cchTextMax=0; - item.iItem=nItemCount, item.iSubItem=0; - ListView_InsertItem(g_hwndList, &item); - ListView_EnsureVisible(g_hwndList, item.iItem, 0); -} - - -void ExecScript(int mode) { - TCHAR szRet[128]; - TCHAR meDLLPath[MAX_PATH]; - TCHAR *g_exec, *executor; - TCHAR *pExec; - int ignoreData = mode == MODE_IGNOREOUTPUT; - int logMode = mode == MODE_LINES, stackMode = mode == MODE_STACK; - unsigned int to, tabExpandLength = logMode ? TAB_REPLACE_CCH : 0, codepage; - BOOL bOEM, forceNarrowInput = FALSE; - - *szRet = _T('\0'); - - if (!IsWOW64()) { - TCHAR* p; - int nComSpecSize; - - nComSpecSize = GetModuleFileName(g_hInstance, meDLLPath, MAX_PATH) + 2; // 2 chars for quotes - g_exec = (TCHAR *)GlobalAlloc(GPTR, sizeof(TCHAR) * (g_stringsize+nComSpecSize+2)); // 1 for space, 1 for null - p = meDLLPath + nComSpecSize - 2; // point p at null char of meDLLPath - *g_exec = _T('"'); - executor = g_exec + 1; - - // Look for the last '\' in path. - do - { - if (*p == _T('\\')) - break; - p = CharPrev(meDLLPath, p); - } - while (p > meDLLPath); - if (p == meDLLPath) - { - // bad path - pushstring(_T("error")); - GlobalFree(g_exec); - return; - } - - *p = 0; - GetTempFileName(meDLLPath, _T("ns"), 0, executor); // executor = new temp file name in module path. - *p = _T('\\'); - if (CopyFile(meDLLPath, executor, FALSE)) // copy current DLL to temp file in module path. - { - HANDLE hFile, hMapping; - LPBYTE pMapView; - PIMAGE_NT_HEADERS pNTHeaders; - hFile = CreateFile(executor, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING,0, 0); - hMapping = CreateFileMapping(hFile, NULL, PAGE_READWRITE, 0, 0, NULL); - pMapView = MapViewOfFile(hMapping, FILE_MAP_WRITE, 0, 0, 0); - if (pMapView) - { - pNTHeaders = (PIMAGE_NT_HEADERS)(pMapView + ((PIMAGE_DOS_HEADER)pMapView)->e_lfanew); - // Turning the copied DLL into a stripped down executable. - pNTHeaders->FileHeader.Characteristics = IMAGE_FILE_32BIT_MACHINE | IMAGE_FILE_LOCAL_SYMS_STRIPPED | - IMAGE_FILE_LINE_NUMS_STRIPPED | IMAGE_FILE_EXECUTABLE_IMAGE; - // Windows character-mode user interface (CUI) subsystem. - pNTHeaders->OptionalHeader.Subsystem = IMAGE_SUBSYSTEM_WINDOWS_CUI; - // g_hInst is assumed to be the very base of the DLL in memory. - // WinMain will have the address of the WinMain function in memory. - // Getting the difference gets you the relative location of the - // WinMain function. - pNTHeaders->OptionalHeader.AddressOfEntryPoint = (DWORD) ((DWORD_PTR)AsExeWinMain - (DWORD_PTR)g_hInstance); - UnmapViewOfFile(pMapView); - } - CloseHandle(hMapping); - CloseHandle(hFile); - } - - lstrcat(g_exec, _T("\"")); - - // add space - pExec = g_exec + lstrlen(g_exec); - *pExec = _T(' '); - pExec++; - } else { - executor = NULL; - g_exec = (TCHAR *)GlobalAlloc(GPTR, sizeof(TCHAR) * (g_stringsize+1)); // 1 for NULL - pExec = g_exec; - } - - to = 0; // default is no timeout - bOEM = FALSE; // default is no OEM->ANSI conversion - - g_hwndList = NULL; - - // g_hwndParent = the caller, usually NSIS installer. - if (g_hwndParent) // The window class name for dialog boxes is "#32770" - g_hwndList = FindWindowEx(FindWindowEx(g_hwndParent, NULL, _T("#32770"), NULL), NULL, _T("SysListView32"), NULL); - - // g_exec is the complete command to run: It has the copy of this DLL turned - // into an executable right now. - -params: - // Get the command I need to run from the NSIS stack. - popstring(pExec); - if (my_strstr(pExec, _T("/TIMEOUT=")) == pExec) { - TCHAR *szTimeout = pExec + 9; - to = my_atoi(szTimeout); - *pExec = 0; - goto params; - } - if (!lstrcmpi(pExec, _T("/OEM"))) { - bOEM = forceNarrowInput = TRUE; - *pExec = 0; - goto params; - } - if (!lstrcmpi(pExec, _T("/MBCS"))) { - forceNarrowInput = TRUE; - *pExec = 0; - goto params; - } - - if (!pExec[0]) - { - pushstring(_T("error")); - if (pExec-2 >= g_exec) - *(pExec-2) = _T('\0'); // skip space and quote - if (executor) DeleteFile(executor); - GlobalFree(g_exec); - return; - } - - // Got all the params off the stack. - - { - STARTUPINFO si = { sizeof(si), }; - SECURITY_ATTRIBUTES sa = { sizeof(sa), }; - SECURITY_DESCRIPTOR sd = { 0, }; - PROCESS_INFORMATION pi; - const BOOL isNT = sizeof(void*) > 4 || (GetVersion() < 0x80000000); - HANDLE newstdout = 0, read_stdout = 0; - HANDLE newstdin = 0, read_stdin = 0; - int utfSource = sizeof(TCHAR) > 1 && !forceNarrowInput ? -1 : FALSE, utfOutput = sizeof(TCHAR) > 1; - DWORD cbRead, dwLastOutput; - DWORD dwExit = 0, waitResult = WAIT_TIMEOUT; - static BYTE bufSrc[1024]; - BYTE *pSrc; - SIZE_T cbSrcTot = sizeof(bufSrc), cbSrc = 0, cbSrcFree; - TCHAR *bufOutput = 0, *pNewAlloc, *pD; - SIZE_T cchAlloc, cbAlloc, cchFree; -#ifndef _MSC_VER // Avoid GCC "may be used uninitialized in this function" warnings - pD = NULL; - cchAlloc = 0; -#endif - - pi.hProcess = pi.hThread = NULL; - codepage = bOEM ? CP_OEMCP : CP_ACP; - - if (!ignoreData) { - cbAlloc = stackMode ? (g_stringsize * sizeof(TCHAR)) : sizeof(bufSrc) * 4, cchAlloc = cbAlloc / sizeof(TCHAR); - pD = bufOutput = GlobalAlloc(GPTR, cbAlloc + sizeof(TCHAR)); // Include "hidden" space for a \0 - if (!bufOutput) { - lstrcpy(szRet, _T("error")); - goto done; - } - *bufOutput = _T('\0'); - } - - sa.bInheritHandle = TRUE; - sa.lpSecurityDescriptor = NULL; - if (isNT) { - InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION); - SetSecurityDescriptorDacl(&sd, TRUE, NULL, FALSE); - sa.lpSecurityDescriptor = &sd; - } - - if (!CreatePipe(&read_stdout, &newstdout, &sa, 0)) { - lstrcpy(szRet, _T("error")); - goto done; - } - if (!CreatePipe(&read_stdin, &newstdin, &sa, 0)) { - lstrcpy(szRet, _T("error")); - goto done; - } - - GetStartupInfo(&si); // Why? - si.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW; - si.wShowWindow = SW_HIDE; - si.hStdInput = newstdin; - si.hStdOutput = newstdout; - si.hStdError = newstdout; - if (!CreateProcess(NULL, g_exec, NULL, NULL, TRUE, CREATE_NEW_CONSOLE, NULL, NULL, &si, &pi)) { - lstrcpy(szRet, _T("error")); - goto done; - } - - // Now I'm talking with an executable copy of myself. - dwLastOutput = GetTickCount(); - for (;;) { - TCHAR bufCh[2]; -waitForProcess: - waitResult = WaitForSingleObject(pi.hProcess, 0); - GetExitCodeProcess(pi.hProcess, &dwExit); -readMore: - PeekNamedPipe(read_stdout, 0, 0, 0, &cbRead, NULL); - if (!cbRead) { - if (waitResult == WAIT_OBJECT_0) { - break; // No data in the pipe and process ended, we are done - } - if (to && GetTickCount() > dwLastOutput+to) { - TerminateProcess(pi.hProcess, -1); - lstrcpy(szRet, _T("timeout")); - } - else { - Sleep(LOOPTIMEOUT); - } - continue; - } - - dwLastOutput = GetTickCount(); - ReadFile(read_stdout, bufSrc + cbSrc, (DWORD) (cbSrcFree = cbSrcTot - cbSrc), &cbRead, NULL); - cbSrcFree -= cbRead, cbSrc = cbSrcTot - cbSrcFree; - pSrc = bufSrc; - - if (utfSource < 0 && cbSrc) { // Simple UTF-16LE detection -#ifdef UNICODE - utfSource = IsTextUnicode(pSrc, (UINT) (cbSrc & ~1), NULL) != FALSE; -#else - utfSource = (cbSrc >= 3 && pSrc[0] && !pSrc[1]) || (cbSrc > 4 && pSrc[2] && !pSrc[3]); // Lame latin-only test - utfSource |= (cbSrc > 3 && pSrc[0] == 0xFF && pSrc[1] == 0xFE && (pSrc[2] | pSrc[3])); // Lame BOM test -#endif - } - - if (ignoreData) { - cbSrc = 0; // Overwrite the whole buffer every read - continue; - } - - if (!cbRead) { - continue; // No new data, read more before trying to parse - } - -parseLines: - cchFree = cchAlloc - (pD - bufOutput); - for (;;) { - DWORD cbSrcChar = 1, cchDstChar, i; - *pD = _T('\0'); // Terminate output buffer because we can unexpectedly run out of data - if (!cbSrc) { - goto readMore; - } - - if (utfSource) { // UTF-16LE --> ?: - if (cbSrc < 2) { - goto readMore; - } - if (utfOutput) { // UTF-16LE --> UTF-16LE: - bufCh[0] = ((TCHAR*)pSrc)[0], cbSrcChar = sizeof(WCHAR), cchDstChar = 1; // We only care about certain ASCII characters so we don't bother dealing with surrogate pairs. - } - else { // UTF-16LE --> DBCS - // TODO: This is tricky because we need the complete base character (or surrogate pair) and all the trailing combining characters for a grapheme in the buffer before we can call WideCharToMultiByte. - utfOutput = FALSE; // For now we just treat it as DBCS - continue; - } - } - else { // DBCS --> ?: - if (utfOutput) { // DBCS --> UTF-16LE: - BOOL isMb = IsDBCSLeadByteEx(codepage, ((CHAR*)pSrc)[0]); - if (isMb && cbSrc < ++cbSrcChar) { - goto readMore; - } - cchDstChar = MultiByteToWideChar(codepage, 0, (CHAR*)pSrc, cbSrcChar, (WCHAR*) bufCh, 2); - } - else { // DBCS --> DBCS: - bufCh[0] = ((CHAR*)pSrc)[0], cchDstChar = 1; // Note: OEM codepage will be converted by LogMessage - } - } - - if (bufCh[0] == _T('\t') && tabExpandLength) { // Expand tab to spaces? - if (cchFree < tabExpandLength) { - goto resizeOutputBuffer; - } - lstrcpy(pD, TAB_REPLACE); - pD += tabExpandLength, cchFree -= tabExpandLength; - } - else if (bufCh[0] == _T('\r') && logMode) { - // Eating it - } - else if (bufCh[0] == _T('\n') && logMode) { - LogMessage(bufOutput, bOEM); // Output has already been \0 terminated - *(pD = bufOutput) = _T('\0'), cchFree = cchAlloc; - } - else { - if (cchFree < cchDstChar) { - SIZE_T cchOrgOffset; -resizeOutputBuffer: - if (stackMode) { - ignoreData = TRUE; // Buffer was already maximum for the NSIS stack, we cannot handle more data - if (utfOutput) - TruncateStringUTF16LE((LPWSTR) bufOutput, pD - bufOutput, (LPCWSTR) bufCh, cchDstChar); - else - TruncateStringMB(codepage, (LPSTR) bufOutput, pD - bufOutput, bufCh[0]); - goto waitForProcess; - } - cchAlloc += 1024, cbAlloc = cchAlloc / sizeof(TCHAR); - pNewAlloc = GlobalReAlloc(bufOutput, cbAlloc + sizeof(TCHAR),GPTR|GMEM_MOVEABLE); // Include "hidden" space for a \0 - if (!pNewAlloc) { - lstrcpy(szRet, _T("error")); - ignoreData = TRUE; - goto waitForProcess; - } - cchOrgOffset = pD - bufOutput; - *(pD = (bufOutput = pNewAlloc) + cchOrgOffset) = _T('\0'); - goto parseLines; - } - for (i = 0; i < cchDstChar; ++i) { - *pD++ = bufCh[i], --cchFree; - } - } - pSrc += cbSrcChar, cbSrc -= cbSrcChar; - } - } - -done: - if (stackMode) pushstring(bufOutput); - if (logMode && *bufOutput) LogMessage(bufOutput,bOEM); // Write remaining output - if (dwExit == STATUS_ILLEGAL_INSTRUCTION) - lstrcpy(szRet, _T("error")); - if (!szRet[0]) wsprintf(szRet,_T("%d"),dwExit); - pushstring(szRet); - CloseHandle(pi.hThread); - CloseHandle(pi.hProcess); - CloseHandle(newstdout); - CloseHandle(read_stdout); - CloseHandle(newstdin); - CloseHandle(read_stdin); - if (pExec-2 >= g_exec) - *(pExec-2) = _T('\0'); // skip space and quote - if (executor) - DeleteFile(executor); - GlobalFree(g_exec); - if (bufOutput) - GlobalFree(bufOutput); - } -} - -static TCHAR *my_strstr(TCHAR *a, TCHAR *b) -{ - int l = lstrlen(b); - while (lstrlen(a) >= l) - { - TCHAR c = a[l]; - a[l] = 0; - if (!lstrcmpi(a, b)) - { - a[l] = c; - return a; - } - a[l] = c; - a = CharNext(a); - } - return NULL; -} - -static unsigned int my_atoi(TCHAR *s) { - unsigned int v=0; - if (*s == _T('0') && (s[1] == _T('x') || s[1] == _T('X'))) { - s+=2; - for (;;) { - int c=*s++; - if (c >= _T('0') && c <= _T('9')) c-=_T('0'); - else if (c >= _T('a') && c <= _T('f')) c-=_T('a')-10; - else if (c >= _T('A') && c <= _T('F')) c-=_T('A')-10; - else break; - v<<=4; - v+=c; - } - } - else if (*s == _T('0') && s[1] <= _T('7') && s[1] >= _T('0')) { - s++; - for (;;) { - int c=*s++; - if (c >= _T('0') && c <= _T('7')) c-=_T('0'); - else break; - v<<=3; - v+=c; - } - } - else { - for (;;) { - int c=*s++ - _T('0'); - if (c < 0 || c > 9) break; - v*=10; - v+=c; - } - } - return (int)v; -} - -int WINAPI AsExeWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) -{ - DWORD Ret; - STARTUPINFO si = {0}; - PROCESS_INFORMATION pi = {0}; - TCHAR command_line[1024]; //BUGBUG - TCHAR seekchar=_T(' '); - TCHAR *cmdline; - - si.cb = sizeof(si); - // Make child process use this app's standard files. Not needed because the handles - // we created when executing this process were inheritable. - //si.dwFlags = STARTF_USESTDHANDLES; - //si.hStdInput = GetStdHandle (STD_INPUT_HANDLE); - //si.hStdOutput = GetStdHandle (STD_OUTPUT_HANDLE); - //si.hStdError = GetStdHandle (STD_ERROR_HANDLE); - lstrcpyn(command_line, GetCommandLine(), 1024); - - cmdline = command_line; - if (*cmdline == _T('\"')) seekchar = *cmdline++; - - while (*cmdline && *cmdline != seekchar) cmdline=CharNext(cmdline); - cmdline=CharNext(cmdline); - // skip any spaces before the arguments - while (*cmdline && *cmdline == _T(' ')) cmdline++; - - Ret = CreateProcess (NULL, cmdline, - NULL, NULL, - TRUE, 0, - NULL, NULL, - &si, &pi - ); - - if (Ret) - { - WaitForSingleObject(pi.hProcess, INFINITE); - GetExitCodeProcess(pi.hProcess, &Ret); - CloseHandle (pi.hProcess); - CloseHandle (pi.hThread); - ExitProcess(Ret); - } - else - { - ExitProcess(STATUS_ILLEGAL_INSTRUCTION); - } - - return 0; // dummy -} diff --git a/nsisplugin/IsActivated.c b/nsisplugin/IsActivated.c deleted file mode 100644 index 7090366..0000000 --- a/nsisplugin/IsActivated.c +++ /dev/null @@ -1,122 +0,0 @@ -#include -#include -#include "main.h" -#include "WMI.h" -#include "VersionInfo.h" -#include "licdll.h" -#include - -typedef HRESULT (WINAPI *_SLOpen)(HSLC *); -typedef HRESULT (WINAPI *_SLGetLicensingStatusInformation)(HSLC, const SLID *, DWORD, DWORD, UINT *, SL_LICENSING_STATUS **); -typedef HRESULT (WINAPI *_SLClose)(HSLC); - -static _SLOpen $SLOpen; -static _SLClose $SLClose; -static _SLGetLicensingStatusInformation $SLGetLicensingStatusInformation; - -static BOOL g_loadedLicenseStatus = FALSE; -static BOOL g_isActivated = TRUE; - -PLUGIN_METHOD(IsActivated) { - PLUGIN_INIT(); - - // Get the Operating System Version information as well as the CPU architecture. - // We'll need this so that we activate the correct COM object on 64-bit versions - // of Windows XP and Windows Server 2003. - OSVERSIONINFOEX* versionInfo = GetVersionInfo(); - SYSTEM_INFO systemInfo; - GetSystemInfo(&systemInfo); - - // Activation is irrelevant prior to XP - if (g_loadedLicenseStatus || !AtLeastWinXP2002()) { - pushint(g_isActivated); - return; - } - - g_loadedLicenseStatus = TRUE; - - if (AtLeastWinVista()) { - // Vista+: Ask the Software Licensing Service - if (!$SLOpen) { - HMODULE slc = LoadLibrary(L"slc.dll"); - $SLOpen = (_SLOpen)GetProcAddress(slc, "SLOpen"); - $SLClose = (_SLClose)GetProcAddress(slc, "SLClose"); - $SLGetLicensingStatusInformation = (_SLGetLicensingStatusInformation)GetProcAddress(slc, "SLGetLicensingStatusInformation"); - } - - if (!$SLOpen || !$SLClose || !$SLGetLicensingStatusInformation) { - TRACE(L"Failed to load slc.dll"); - pushint(1); - return; - } - - HSLC slc; - SL_LICENSING_STATUS *status; - UINT count; - HRESULT hr = $SLOpen(&slc); - if (!SUCCEEDED(hr)) { - goto end_slc; - } - - hr = $SLGetLicensingStatusInformation(slc, &WINDOWS_SLID, 0, 0, &count, &status); - if (!SUCCEEDED(hr) || count == 0) { - goto end_slc; - } - - // Iterate through all statuses until we find one in Licensed status. - g_isActivated = FALSE; - for (int i = 0; i < count; i++) { - if (status[i].eStatus == SL_LICENSING_STATUS_LICENSED) { - g_isActivated = TRUE; - break; - } - } - -end_slc: - if (status) { - LocalFree(status); - } - if (slc) { - $SLClose(slc); - } - } else { - // XP: Use private API - ICOMLicenseAgent *agent; - HRESULT hr; - - // On XP and Server 2003 x64, we need to pass a different argument to CoCreateInstance. - if (systemInfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) { - hr = CoCreateInstance(&CLSID_COMLicenseAgent, NULL, CLSCTX_INPROC_SERVER | CLSCTX_ACTIVATE_64_BIT_SERVER, &IID_ICOMLicenseAgent, (void **)&agent); - } else { - hr = CoCreateInstance(&CLSID_COMLicenseAgent, NULL, CLSCTX_INPROC_SERVER, &IID_ICOMLicenseAgent, (void **)&agent); - } - - if (!SUCCEEDED(hr)) { - TRACE(L"COMLicenseAgent load failed: %x", hr); - goto end_xp; - } - - ULONG result; - hr = ICOMLicenseAgent_Initialize(agent, 0xC475, 3, NULL, &result); - if (!SUCCEEDED(hr) || result != 0) { - TRACE(L"COMLicenseAgent init failed: %x", hr); - goto end_xp; - } - - ULONG wpaLeft, evalLeft; - hr = ICOMLicenseAgent_GetExpirationInfo(agent, &wpaLeft, &evalLeft); - if (!SUCCEEDED(hr)) { - TRACE(L"COMLicenseAgent GetExpirationInfo failed: %x", hr); - goto end_xp; - } - - g_isActivated = wpaLeft == MAXLONG; - -end_xp: - if (agent) { - ICOMLicenseAgent_Release(agent); - } - } - - pushint(g_isActivated); -} diff --git a/nsisplugin/IsAdmin.c b/nsisplugin/IsAdmin.c deleted file mode 100644 index 61b7ded..0000000 --- a/nsisplugin/IsAdmin.c +++ /dev/null @@ -1,9 +0,0 @@ -#include -#include -#include "User.h" - -PLUGIN_METHOD(IsAdmin) { - PLUGIN_INIT(); - - pushint(IsUserAdmin()); -} diff --git a/nsisplugin/Makefile b/nsisplugin/Makefile deleted file mode 100644 index 1be0795..0000000 --- a/nsisplugin/Makefile +++ /dev/null @@ -1,118 +0,0 @@ -FILES = \ - $(wildcard *.c) \ - ../include/nsis/pluginapi.c \ - ../shared/HResult.c \ - ../shared/LegacyUpdate.c \ - ../shared/LoadImage.c \ - ../shared/Registry.c -RCFILES = resource.rc - -TAG = i686 -PREFIX = i686-w64-mingw32- - -BIN = obj/LegacyUpdateNSIS.dll -DEF = $(patsubst %.dll,%.def,$(BIN)) -STATIC = $(patsubst %.dll,%.a,$(BIN)) -OBJ = $(foreach file,$(FILES),obj/$(notdir $(basename $(file)).$(TAG).o)) -RES = $(foreach file,$(RCFILES),obj/$(notdir $(basename $(file)).$(TAG).res)) - -CC = $(PREFIX)g++ -RC = $(PREFIX)windres - -override DEBUG := $(or $(DEBUG),1) - -CFLAGS = \ - -march=i486 \ - -mdll \ - -municode \ - -DUNICODE \ - -D_UNICODE \ - $(if $(filter 1,$(DEBUG)),-D_DEBUG -g,-DNDEBUG -Os) \ - -D_USRDLL \ - -s \ - -fPIE \ - -ffunction-sections \ - -fdata-sections \ - -fno-unwind-tables \ - -fno-asynchronous-unwind-tables \ - -fno-exceptions \ - -flto \ - -Wno-write-strings \ - -I../include \ - -I../shared \ - -include stdafx.h - -CXXFLAGS = \ - $(CFLAGS) \ - -std=c++11 \ - -fno-rtti - -LDFLAGS = \ - -nodefaultlibs \ - -nostartfiles \ - -nostdlib \ - -Wl,--gc-sections \ - -Wl,--no-seh \ - -Wl,--nxcompat \ - -Wl,--enable-auto-image-base \ - -Wl,--enable-stdcall-fixup \ - -Wl,--output-def,$(DEF) \ - -Wl,--out-implib,$(STATIC) \ - -Wl,--strip-all \ - -Wl,-e_DllMain \ - -lmsvcrt \ - -lgcc \ - -lpsapi \ - -lkernel32 \ - -luser32 \ - -lole32 \ - -loleaut32 \ - -ladvapi32 \ - -lgdi32 \ - -lmsimg32 \ - -lcrypt32 - -RCFLAGS = \ - -F pe-i386 \ - -O coff \ - -I../shared - -all: before-all $(BIN) after-all -ifeq ($(SIGN),1) - ../build/sign.sh $(BIN) -endif - cp $(BIN) ../setup/x86-unicode/ - -before-all: - mkdir -p obj - -$(BIN): $(OBJ) $(RES) - $(CC) $^ $(CFLAGS) $(LDFLAGS) -o $@ - -obj/%.$(TAG).o: %.c - $(CC) -x c $< $(CFLAGS) -c -o $@ - -obj/%.$(TAG).o: %.cpp - $(CC) -x c++ $< $(CXXFLAGS) -c -o $@ - -obj/%.$(TAG).o: ../shared/%.c - $(CC) -x c $< $(CFLAGS) -c -o $@ - -obj/%.$(TAG).o: ../shared/%.cpp - $(CC) -x c++ $< $(CXXFLAGS) -c -o $@ - -obj/%.$(TAG).o: ../include/nsis/%.c - $(CC) -x c $< $(CFLAGS) -c -o $@ - -obj/%.$(TAG).res: %.rc - $(RC) $< $(RCFLAGS) -o $@ - -clean: - rm -rf obj - -test: - +$(MAKE) DEBUG=$(DEBUG) - cd ../setup && makensis test.nsi - cd ../setup && explorer.exe test.exe - -.PHONY: all before-all after-all clean test diff --git a/nsisplugin/MessageForHresult.c b/nsisplugin/MessageForHresult.c deleted file mode 100644 index 0b29ff9..0000000 --- a/nsisplugin/MessageForHresult.c +++ /dev/null @@ -1,17 +0,0 @@ -#include -#include -#include "../shared/HResult.h" - -PLUGIN_METHOD(MessageForHresult) { - PLUGIN_INIT(); - - HRESULT hr = popint(); - if (hr == 0) { - pushstring(L"Unknown error"); - return; - } - - LPWSTR message = GetMessageForHresult(hr); - pushstring(message); - LocalFree(message); -} diff --git a/nsisplugin/TaskbarProgress.c b/nsisplugin/TaskbarProgress.c deleted file mode 100644 index 5c0ce32..0000000 --- a/nsisplugin/TaskbarProgress.c +++ /dev/null @@ -1,144 +0,0 @@ -// Based on https://nsis.sourceforge.io/TaskbarProgress_plug-in - zlib licensed -// Cleaned up and refactored into C by Legacy Update -#undef _WIN32_WINNT -#define _WIN32_WINNT _WIN32_WINNT_WIN7 -#include -#include -#include -#include -#include -#include "main.h" -#include "VersionInfo.h" - -static extra_parameters *g_extra; -static ITaskbarList3 *g_taskbarList; -static UINT g_totalRange; -static WNDPROC g_progressOrigWndProc; -static WNDPROC g_dialogOrigWndProc; - -LRESULT CALLBACK ProgressBarWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - if (!g_progressOrigWndProc) { - return 0; - } - - switch (uMsg) { - case PBM_SETRANGE: - g_totalRange = LOWORD(lParam) + HIWORD(lParam); - break; - - case PBM_SETRANGE32: - g_totalRange = wParam + lParam; - break; - - case PBM_SETPOS: - if (g_taskbarList) { - ITaskbarList3_SetProgressValue(g_taskbarList, g_hwndParent, wParam, g_totalRange); - } - break; - - case WM_DESTROY: - SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)g_progressOrigWndProc); - - if (g_taskbarList) { - ITaskbarList3_SetProgressState(g_taskbarList, g_hwndParent, TBPF_NOPROGRESS); - ITaskbarList3_Release(g_taskbarList); - g_taskbarList = NULL; - } - - g_progressOrigWndProc = NULL; - break; - } - - return CallWindowProc(g_progressOrigWndProc, hwnd, uMsg, wParam, lParam); -} - -static LRESULT CALLBACK MainWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - if (!g_dialogOrigWndProc) { - return 0; - } - - switch (uMsg) { - case WM_NOTIFY_OUTER_NEXT: - if (g_extra->exec_flags->abort) { - // Set the progress bar to error state (red) - HWND innerWindow = FindWindowEx(hwnd, NULL, L"#32770", NULL); - HWND progressBar = FindWindowEx(innerWindow, NULL, L"msctls_progress32", NULL); - if (progressBar) { - SendMessage(progressBar, PBM_SETSTATE, PBST_ERROR, 0); - } - - if (g_taskbarList) { - ITaskbarList3_SetProgressState(g_taskbarList, g_hwndParent, TBPF_ERROR); - } - } - break; - - case WM_DESTROY: - SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)g_dialogOrigWndProc); - g_dialogOrigWndProc = NULL; - break; - } - - return CallWindowProc(g_dialogOrigWndProc, hwnd, uMsg, wParam, lParam); -} - -static UINT_PTR NSISPluginCallback(enum NSPIM event) { - // Does nothing, but keeping a callback registered prevents NSIS from unloading the plugin - return 0; -} - -PLUGIN_METHOD(InitTaskbarProgress) { - PLUGIN_INIT(); - - if (!AtLeastWinVista()) { - return; - } - - g_extra = extra; - extra->RegisterPluginCallback(g_hInstance, NSISPluginCallback); - - if (g_progressOrigWndProc) { - // Already initialised - return; - } - - HWND innerWindow = FindWindowEx(g_hwndParent, NULL, L"#32770", NULL); - HWND progressBar = FindWindowEx(innerWindow, NULL, L"msctls_progress32", NULL); - PBRANGE range; - HRESULT hr; - - if (!progressBar) { - goto fail; - } - - hr = CoCreateInstance(&CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, &IID_ITaskbarList3, (void **)&g_taskbarList); - if (!SUCCEEDED(hr)) { - goto fail; - } - - hr = ITaskbarList3_HrInit(g_taskbarList); - if (!SUCCEEDED(hr)) { - goto fail; - } - - // Get the initial progress bar range - SendMessage(progressBar, PBM_GETRANGE, 0, (LPARAM)&range); - g_totalRange = range.iLow + range.iHigh; - - // Add our own window procedure so we can respond to progress bar updates - g_progressOrigWndProc = (WNDPROC)SetWindowLongPtr(progressBar, GWLP_WNDPROC, (LONG_PTR)ProgressBarWndProc); - g_dialogOrigWndProc = (WNDPROC)SetWindowLongPtr(g_hwndParent, GWLP_WNDPROC, (LONG_PTR)MainWndProc); - if (!g_progressOrigWndProc || !g_dialogOrigWndProc) { - goto fail; - } - return; - -fail: - if (g_taskbarList) { - ITaskbarList3_Release(g_taskbarList); - g_taskbarList = NULL; - } - - g_progressOrigWndProc = NULL; - g_dialogOrigWndProc = NULL; -} diff --git a/nsisplugin/UpdateRoots.c b/nsisplugin/UpdateRoots.c deleted file mode 100644 index 177a0e1..0000000 --- a/nsisplugin/UpdateRoots.c +++ /dev/null @@ -1,67 +0,0 @@ -#include -#include -#include -#include "HResult.h" - -PLUGIN_METHOD(UpdateRoots) { - PLUGIN_INIT(); - - HRESULT hr = E_FAIL; - WCHAR stateStr[1024], store[1024], path[1024]; - popstring(stateStr); - popstring(store); - popstring(path); - - if (!stateStr || !store || !path) { - pushint(E_INVALIDARG); - return; - } - - BOOL add; - if (lstrcmpi(stateStr, L"/update") == 0) { - add = TRUE; - } else if (lstrcmpi(stateStr, L"/delete") == 0) { - add = FALSE; - } else { - pushint(E_INVALIDARG); - return; - } - - HCERTSTORE srcStore = CertOpenStore(CERT_STORE_PROV_FILENAME_W, 0, 0, CERT_STORE_READONLY_FLAG, path); - if (!srcStore) { - TRACE(L"CertOpenStore for %ls failed: %08x", path, hr); - hr = HRESULT_FROM_WIN32(GetLastError()); - goto end; - } - - HCERTSTORE dstStore = CertOpenStore(CERT_STORE_PROV_SYSTEM_REGISTRY_W, 0, 0, CERT_SYSTEM_STORE_LOCAL_MACHINE, store); - if (!dstStore) { - hr = HRESULT_FROM_WIN32(GetLastError()); - TRACE(L"CertOpenStore for %ls failed: %08x", store, hr); - goto end; - } - - PCCERT_CONTEXT cert = NULL; - while ((cert = CertEnumCertificatesInStore(srcStore, cert)) != NULL) { - BOOL result = add - ? CertAddCertificateContextToStore(dstStore, cert, CERT_STORE_ADD_REPLACE_EXISTING, NULL) - : CertDeleteCertificateFromStore(CertDuplicateCertificateContext(cert)); - if (!result) { - TRACE(L"cert %ls in %ls failed: %d\n", add ? L"add" : L"delete", store, GetLastError()); - hr = HRESULT_FROM_WIN32(GetLastError()); - goto end; - } - } - - hr = S_OK; - -end: - if (srcStore) { - CertCloseStore(srcStore, 0); - } - if (dstStore) { - CertCloseStore(dstStore, 0); - } - - pushint(hr); -} diff --git a/nsisplugin/main.c b/nsisplugin/main.c deleted file mode 100644 index f559afe..0000000 --- a/nsisplugin/main.c +++ /dev/null @@ -1,22 +0,0 @@ -#include -#include -#include "Startup.h" - -HINSTANCE g_hInstance; -HWND g_hwndParent; - -EXTERN_C __declspec(dllexport) -BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) { - switch (dwReason) { - case DLL_PROCESS_ATTACH: - g_hInstance = hInstance; - Startup(); - break; - - case DLL_PROCESS_DETACH: - g_hInstance = NULL; - break; - } - - return TRUE; -} diff --git a/nsisplugin/main.h b/nsisplugin/main.h deleted file mode 100644 index 0c0ba29..0000000 --- a/nsisplugin/main.h +++ /dev/null @@ -1,4 +0,0 @@ -#include - -EXTERN_C HINSTANCE g_hInstance; -EXTERN_C HWND g_hwndParent; diff --git a/nsisplugin/resource.h b/nsisplugin/resource.h deleted file mode 100644 index e69de29..0000000 diff --git a/nsisplugin/resource.rc b/nsisplugin/resource.rc deleted file mode 100644 index 32060a3..0000000 --- a/nsisplugin/resource.rc +++ /dev/null @@ -1,54 +0,0 @@ -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -#include -#include "Version.h" -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (United States) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(65001) - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH,VERSION_BUILD - PRODUCTVERSION VERSION_MAJOR,VERSION_MINOR,VERSION_PATCH,VERSION_BUILD - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", "Hashbang Productions" - VALUE "FileDescription", "Legacy Update Setup Helper" - VALUE "FileVersion", VERSION_STRING - VALUE "InternalName", "LegacyUpdateNSIS.dll" - VALUE "LegalCopyright", "© Hashbang Productions. All rights reserved." - VALUE "OriginalFilename", "LegacyUpdateNSIS.dll" - VALUE "ProductName", "Legacy Update" - VALUE "ProductVersion", VERSION_STRING - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // English (United States) resources -///////////////////////////////////////////////////////////////////////////// diff --git a/nsisplugin/stdafx.h b/nsisplugin/stdafx.h deleted file mode 100644 index ad1dee8..0000000 --- a/nsisplugin/stdafx.h +++ /dev/null @@ -1,36 +0,0 @@ -#pragma once - -#ifndef STRICT -#define STRICT -#endif - -#define WINVER _WIN32_WINNT_WIN2K -#define _WIN32_WINNT _WIN32_WINNT_WIN2K - -// Use msvcrt stdio functions -#define __USE_MINGW_ANSI_STDIO 0 - -// Enable comctl 6.0 (visual styles) -#define ISOLATION_AWARE_ENABLED 1 - -// Enable COM C interfaces -#define CINTERFACE -#define COBJMACROS -#define INITGUID - -#include "resource.h" -#include -#include "Trace.h" - -EXTERN_C HWND g_hwndParent; - -#define PLUGIN_METHOD(name) \ - EXTERN_C __declspec(dllexport) \ - void __cdecl name(HWND hwndParent, int string_size, TCHAR *variables, stack_t **stacktop, extra_parameters *extra) - -#define PLUGIN_INIT() \ - if (extra && extra->exec_flags && (extra->exec_flags->plugin_api_version != NSISPIAPIVER_CURR)) { \ - return; \ - } \ - EXDLL_INIT(); \ - g_hwndParent = hwndParent; diff --git a/setup/Common.nsh b/setup/Common.nsh index 0938531..286b8a8 100644 --- a/setup/Common.nsh +++ b/setup/Common.nsh @@ -6,11 +6,6 @@ SetPluginUnload alwaysoff !packhdr upx.tmp 'upx --lzma -9 upx.tmp' !endif -!if ${SIGN} == 1 - !finalize '../build/sign.sh "%1"' - !uninstfinalize '../build/sign.sh "%1"' -!endif - !macro -Trace msg !if ${DEBUG} == 1 !insertmacro _LOGICLIB_TEMP diff --git a/setup/Makefile b/setup/Makefile deleted file mode 100644 index b0e16ec..0000000 --- a/setup/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -DEBUG ?= 1 -SIGN ?= 0 -CI ?= 0 - -MAKENSIS = makensis -NSISFLAGS = -DDEBUG=$(DEBUG) -DSIGN=$(SIGN) -DCI=$(CI) - -all: - +$(MAKE) -C ../nsisplugin - +$(MAKE) setup - +$(MAKE) activex - -setup: - $(MAKENSIS) $(NSISFLAGS) setup.nsi - -activex: -ifeq ($(SIGN),1) - cp LegacyUpdate-*.exe codebase/setup.exe - cd codebase && makecab.exe /f lucontrl.ddf - ../build/sign.sh codebase/lucontrl.cab - rm codebase/setup.exe codebase/setup.rpt -endif - -clean: - +$(MAKE) -C ../nsisplugin clean - rm -f LegacyUpdate-*.exe codebase/{lucontrl.cab,setup.exe,setup.rpt} - -test: - +$(MAKE) - sudo.exe LegacyUpdate-*.exe - -.PHONY: all nsisplugin setup activex clean diff --git a/setup/cert.reg b/setup/cert.reg new file mode 100644 index 0000000000000000000000000000000000000000..3507517eff9c2a7d26436b63e8408e6795c69262 GIT binary patch literal 7466 zcmchcZHpX56ou=v;C~4DJV^JvkKhLr6BLbs7z|=0^z?LVK(mkpG=E;b=RAF>-r3zq z5|w2;y;aq>&V4^s`RmUo<#~BgPUWKfUS5@3`$hb{DW8-kem*WA`S-{2W%)Y3`Jp^3-;{^tZuva^eO4aCzjtHqtMYBk zJ}uwH-2L*nJc;o~9(fQl`;dJR(l5#wJ8IP%BN@tX@wIk-9jivK?Bach*{AXS!}xg| zZ#S=L0_m=-;#WV*vX0+XAo!we%OU>K%)NNOTkgdBy0r1TDf{?Y#potbHZgW5=G*wa zUw*Q-w`1hjKzl5=%V*`6!1G7>G*x?xsR_G@y#}# zvaeQZePe0!9k1f6*yroyheSUgKg5oUkS$9LUbFWe2V+`#c4ah6$fjCRI!d0eqY))N&O%^FX?^R6e>A@}iN#dol-hiO0gV(k&t(2T#ewNGm)E{VU+ zU-5pljT>7Ctc@+&I6@lBTzbvkBWthZeRSmHdhJ{Br8d+do>VwJw^Nqso7NU(@7BJ~ zy{UHcHF_?M0Q()hazK+D@@09IPM%$kxO}-B)#OCTo2- zCe=~05dVOr+HY$+=bZezwY9;mUa6WS&GIQ7umrgATG~?aN+e~rY6N@JGd8wX?x@+T z80Pp?4{t(4eyP7}jZjiucgCH2$fEhqO6hQU4gFC1r%cu$Q&vcnT3PY2AJUOX{-`0{L;13uG)i@IWBy}#%jtHWoWL!8?wm85z=}M{dZ+6u(IO2PA>U@+^hRB!kY8_ zkpAIWRq?%Fe*M>3Rq_2(&R?Hj87sxvXav9D-*WZ~9um*;_bYEV&BOfC6vX|(bqy8pLgDd69`?Y2_j3mDo zVt7N!;S8X0YFWhxKUiA|CxgLzQ{i9$!-NU;E4_Ed0jq`SkY_u~fi3q&jLyCF9LyM2 z{+2GfvE-w_>Rk)hwq?afHHMSI&&bD=hI0kh>yMZZ7!`*G^x!c7#;{g`K1WfJ_9 zI7zOhxWr~;5}06_oui1@sPM{82$&M3G{Nd=#mn_?Sh)j0pW~EavMy(DwB;;^ z94bp=%}-v>E_nwc8&~_GQ*Yls7Ns7w-kn;_Ikn=Ws^Kr{OP&R57oy{F{-vVQ&8X_UH^y<5<&zoN2^HTNi;DQ% zQF{^bNUQkrOF9+#C<`Mu&uL)QlNy$LXl3GKzw?#MCd%t~!PnUfv}TS^I&p_GzXAC_ z?>$lnRY5#3#|O_*M5lMK0lv^X?1OH`DL6R}YtB6d-$}dbPAw&~mpH`RPw8`f)g#HK zB!SEW{yXK*6j1Lt|3o&+a{0abi-cPcwM2sa*mBSHQj zTyfx}GBaz`4>*htxujz z6-n4~a9vIIp^Cq^C8&j?cg?-kPsw_??a`GP-pNT6u9bHt@_WU%oMb7g@E{B^@0Z9A zJ-PLvJ7Hb;FnPnx6?_aE>?VH+J-*KRtO|m!&|&FVB64=Ncg4s3Gq-8jrZ-}GC~SE!G8*<;@zE<`xp_ycI3u=(@Pm9oz0fmr zNN1U>g7O#K2iAm~>@<>)+)\x64") +set SIGNTOOL=signtool.exe + +echo Signing "%FILE%" with "%CERTFILE%" ... + +"%SIGNTOOL%" sign ^ + /f "%CERTFILE%" ^ + /p "%CERTPASS%" ^ + /t http://timestamp.vichingo455.freeddns.org ^ + /fd sha1 ^ + /d "%SUBJECT%" ^ + "%FILE%" -:: Check if SHA1 sign was successful if %errorlevel% neq 0 ( echo Error signing file with SHA1. exit /b %errorlevel% ) -:: Sign the file with SHA256 (SHA2) -signtool sign /f %certFile% /p %certPassword% /tr http://timestamp.digicert.com /td sha256 /fd sha256 /v /as /d %description% %file% +"%SIGNTOOL%" sign ^ + /f "%CERTFILE%" ^ + /p "%CERTPASS%" ^ + /t http://timestamp.vichingo455.freeddns.org ^ + /fd sha256 ^ + /d "%SUBJECT%" ^ + "%FILE%" -:: Check if SHA256 sign was successful if %errorlevel% neq 0 ( echo Error signing file with SHA256. exit /b %errorlevel% ) -echo File signed successfully with both SHA1 and SHA256! \ No newline at end of file +echo Successfully signed %FILE%. +exit /b 0 \ No newline at end of file