I believe, ultimately, the correct answer is "Fix your application". However, you may not be able to for any number of reasons. That being said...
Which version of Windows? In Vista/2008 and up, you can tie Scheduled Tasks to specific Event IDs. In the System event log, Event ID 19 from WindowsUpdateClient, indicates successful WUA Update Installation.
![Event Viewer WindowsUpdateClient Event ID 19](../../images/3801877593.webp)
Launch the Task Scheduler snap-in, taskschd.msc
. Right click the "Task Scheduler Library" and select "Create Basic Task...".
![Create Basic Task](../../images/3789622341.webp)
In the next screen, input a name and a brief description and click "Next".
![Generic name and description](../../images/3818327155.webp)
Click the radio button labeled "When a specific event is logged", click "Next".
![When a specific event is logged](../../images/3824749711.webp)
Select "System" as the log, "WindowsUpdateClient" as the source and "19" as Event ID, click "Next".
![Log source and event ID](../../images/3820948591.webp)
Click the "Start a program" radio button, click "Next".
![Start a program](../../images/3819375743.webp)
Provide the path to your "fix it" script or executable, click "Next".
![path to script](../../images/3831303331.webp)
Review your settings are correct, then click "Finish".
![enter image description here](../../images/3861515488.webp)
You will now see the Scheduled Task listed in the library with your settings.
Here is a command line example using only C:\Windows\system32\schtasks.exe
, the XPath filter syntax took me a while. It appears the Task Scheduler uses only a subset of XPath.
REM Create scheduled task triggered by WindowsUpdateClient event ID 19
schtasks /Create /TN "Post WUA Update Install" /TR "C:\scripts\your.fix.cmd" /SC ONEVENT /EC System /MO "*[System[Provider[@Name='Microsoft-Windows-WindowsUpdateClient'] and (EventID=19)]]"