Automate some tasks or scripts after windows update


Sheikh

Software Developer
Power User
VIP
Local time
7:15 AM
Posts
746
Location
Tehran, IRAN.
OS
Windows 11 Pro 25H2
Hi!
How can I automate some tasks after a windows update? I want to run some scripts/commands after that.
Couldn’t fine such option in task scheduler which lets user to run a specific file after an update.
Any idea to automate the task? Maybe some registry keys can solve it!

Thanks.
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2Ryzen 5 3500U8GBVega 8
    OS
    Windows 11 Pro 25H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • At a glance

    Windows 10 Enterprise LTSC 21H2intel core i7 6700HQ16GBNvidia Geforce GTX1060 (6GB)
    Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
Windows Update agent generates an event when each update is installed. Look for events with a source of Windows Update, and then trigger a task on those events.
 

My Computer My Computer

At a glance

Windows 11 Enterprise 25H2
OS
Windows 11 Enterprise 25H2
Windows Update agent generates an event when each update is installed. Look for events with a source of Windows Update, and then trigger a task on those events.
Do you mean this? Is it still working on win11? As I have disabled event viewer, is this method still possible?
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2Ryzen 5 3500U8GBVega 8
    OS
    Windows 11 Pro 25H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • At a glance

    Windows 10 Enterprise LTSC 21H2intel core i7 6700HQ16GBNvidia Geforce GTX1060 (6GB)
    Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
I'm not sure what you mean by "this," and I'm not reading that whole page to try to figure out what you mean. But yes, the Windows Update client generates events when it downloads an update, starts installing it, and finishes installing it. You can take action based on when an event occurs. Not sure why one would disable event viewer, but okay.
 

My Computer My Computer

At a glance

Windows 11 Enterprise 25H2
OS
Windows 11 Enterprise 25H2
Not sure why one would disable event viewer, but okay.
Hard-core gamers have learned to disable all the event logs, in order to reduce FPS stutter.

If your task will take some time to execute, it's best to disable automatic reboot after updates. Otherwise your task will trigger, but there's no guarantee it finishes running before a reboot takes effect.
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
That’s event logs, not viewer.
 

My Computer My Computer

At a glance

Windows 11 Enterprise 25H2
OS
Windows 11 Enterprise 25H2
I read his NTLite preset, he's disabled the event logs. The free edition of NTLite allows that.
 

My Computer My Computer

At a glance

Windows 7
OS
Windows 7
Again, you’re saying logs. He said viewer.
 

My Computer My Computer

At a glance

Windows 11 Enterprise 25H2
OS
Windows 11 Enterprise 25H2
Do you mean this? Is it still working on win11? As I have disabled event viewer, is this method still possible?

This is the method I use. It works on Windows 11, but I don't know if it will work with event logging disabled.

Ben
 

My Computers My Computers

  • At a glance

    Windows 10 HomeIntel Core 2 Duo [email protected] GHz2 GB
    OS
    Windows 10 Home
    Computer type
    Laptop
    Manufacturer/Model
    HP Elitebook 2530p
    CPU
    Intel Core 2 Duo [email protected] GHz
    Memory
    2 GB
  • At a glance

    Windows 11 HomeIntel Core 2 Duo E75004 GB
    Operating System
    Windows 11 Home
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Optiplex 330
    CPU
    Intel Core 2 Duo E7500
    Memory
    4 GB

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2Ryzen 5 3500U8GBVega 8
    OS
    Windows 11 Pro 25H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • At a glance

    Windows 10 Enterprise LTSC 21H2intel core i7 6700HQ16GBNvidia Geforce GTX1060 (6GB)
    Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender
I will test it

Thanks everyone ❤️
 

My Computers My Computers

  • At a glance

    Windows 11 Pro 25H2Ryzen 5 3500U8GBVega 8
    OS
    Windows 11 Pro 25H2
    Computer type
    Laptop
    Manufacturer/Model
    Huawei MateBook D15
    CPU
    Ryzen 5 3500U
    Memory
    8GB
    Graphics Card(s)
    Vega 8
    Screen Resolution
    FHD
    Hard Drives
    256GB Samsung SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    ESET Smart Security Premium
  • At a glance

    Windows 10 Enterprise LTSC 21H2intel core i7 6700HQ16GBNvidia Geforce GTX1060 (6GB)
    Operating System
    Windows 10 Enterprise LTSC 21H2
    Computer type
    Laptop
    Manufacturer/Model
    MSI GS73 6RF Stealth Pro
    CPU
    intel core i7 6700HQ
    Memory
    16GB
    Graphics card(s)
    Nvidia Geforce GTX1060 (6GB)
    Screen Resolution
    FHD
    Hard Drives
    128GB SSD + 1TB HDD
    Browser
    Microsoft Edge
    Antivirus
    Windows Defender

Latest Support Threads

Back
Top Bottom