disable and enable services

So, there’s no easy or straightforward way of detecting when the installation is complete. It all depends on the patch being installed. You may have to loop every 5 minutes, for example, and query something like Win32_QuickFixEngineering to see if the hot fix ID shows as installed or not.