Questions tagged [wuapi]

Windows Update Agent API

Wuapi is a Windows Update Client API from Microsoft Corporation belonging to Microsoft® Windows® Operating System.

47 questions
1
vote
1 answer

C# - Using wuapi.dll without embedding it into project

I am trying to create a program, allowing silent installation of important updates for Windows. I want it to be a single .exe file, without any additional files, libraries, icons etc. I am using .Net 3.5. I included wuapi.dll to the References…
Sergey Dudkin
  • 169
  • 1
  • 10
0
votes
0 answers

Why does search for installed updates using win32com.client.Dispatch() not match Control Panel

I'm on Windows Server 2019 Standard, 1809, 17763.4499 Using Python v3.11.4:d2340ef Based on the code found here I've written the following script to find out what updates have been installed. The issue is; the reported updates don't match what I see…
RightmireM
  • 2,381
  • 2
  • 24
  • 42
0
votes
1 answer

Windows Update UI stuck on Error Encountered even when WindowsUpdateService is up and running

I need to implement disabling/enabling windows update from CMD/PowerShell. for that, I'm using the following commands to disable the WindowsUpdate: sc config wuauserv start= disabled sc stop wuauserv And for enabling I'm using the following…
0
votes
1 answer

C# Wuapi gives incorrect feature update information

I use wuapi for scanning and installing updates on windows 10 computers. I find an update on my computer it gives details but i cannot find this update anywhere in windows catalog or even on wsus (I search in all classifications and products…
Cozdemir
  • 177
  • 2
  • 19
0
votes
1 answer

Check if a new Windows version is available and install programmatically

I would like to check programmatically if a new Windows "feature update" - that is a new major version like 1904, 20H2 - is available. It seems WUAPI doesn't return these updates, but I might be making a mistake. I think it is possible to install…
jdm
  • 9,470
  • 12
  • 58
  • 110
0
votes
1 answer

Windows Update via Powershell IndexOutOfRangeException

I am trying to install windows updates via PowerShell making use of COM objects from WUApi. Here's the code I have got so far. $updateSession = New-Object -com Microsoft.update.Session $updateSearcher =…
Kumar
  • 113
  • 1
  • 10
0
votes
1 answer

ISearchJob->Release() stucking

I'm using wuapi to find Windows Updates. I faced with the problem: pJob->Release(); stucking in the following code on some machines, but generally it works correct. What could be the reason of such behavior? I have tried to change ISearchJob* to…
Zhenya
  • 11
  • 3
0
votes
2 answers

How to detect windows update status

I want to detect current windows 10 update status programmatically. I tried wuapi and it works well but there are some problems in wuapi. First, it takes long time to get update information. Second, it can not be used at offline. Is there any other…
Jack Lee
  • 363
  • 5
  • 18
0
votes
1 answer

How can I detect current windows update status at offline?

I'm going to detect my os update status using wuapi. Using IUpdateSearcher::Search i can do it, but this function can only be used at online. At offline I also used IUpdateServiceManager::AddScanPackageService function to get status but this…
Jack Lee
  • 363
  • 5
  • 18
0
votes
0 answers

ISearchJob->CleanUp gets stuck

I am searching asynchronously for missing patches via WUAPIs. I have declared an ISearchJob object (https://learn.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-isearchjob). If I receive a timeout from WaitForSingleObject function, I call…
theTAG
  • 21
  • 5
0
votes
0 answers

Installing important updates for Windows Update

// Create installer from list IUpdateInstaller installer = session.CreateUpdateInstaller(); installer.Updates = updatesToInstall; // Install updates IInstallationResult installationRes = installer.Install(); I can make optional updates using this.…
0
votes
1 answer

WUA API unable to find update

Code sample: $UpdateSession = New-Object -ComObject 'Microsoft.Update.Session' $UpdateSearcher = $UpdateSession.CreateUpdateSearcher() $Updates = $UpdateSearcher.Search('IsInstalled=1') $Updates | Where-Object { $_.Title -like '*KB2506143*' } I'm…
Maximilian Burszley
  • 18,243
  • 4
  • 34
  • 63
0
votes
0 answers

IUpdateSearcher::BeginSearch invalid pointer error

I am going to search for updates with BeginSearch. ISearchCompletedCallback has been implemented in with way: #pragma once class ISCC : public ISearchCompletedCallback { public: ISCC() { } ~ISCC() { } public: ULONG…
Space Rabbit
  • 141
  • 2
  • 11
0
votes
1 answer

How to discard IUpdateSearcher::BeginSearch

I am going to enumerate not installed updates with Windows Update Agent. And I have one question. Is that a way to discard/stop BeginSearch method (searching process). I have tried to stop search process with EndSearch but it does not stop it.…
Space Rabbit
  • 141
  • 2
  • 11
0
votes
0 answers

Is there a way to hide a specific Windows Update using C++ and WUA

Using the Windows Update Agent API, is there a way to hide updates? I have looked through the docs and I have not seen anything yet. Somebody has done it using VB but I need to use C++. Edit: Here is a link to the VB script I found:…
rn10950
  • 93
  • 3
  • 11