Determine if hotfix is applied via batch file
Good Morning,
We have a complex piece of software we are getting ready to deploy through KACE. This software requires specific hotfixes from MS and they have to be installed in a specific order and a reboot has to happen between each.
I am going to create a single batch file to automate this process and create the package for KACE.
How can you determine if a KB has been installed via a batch file?
I want something such as
if KB111111 (the first patch) is not installed
execute kb111111 with a reboot switch
if kb222222 (second patch) is not installed
execute kb222222 with a reboot switch
and so on.
Once these are installed the software will install.
Thank You,
Mark
0 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
rileyz
8 years ago
I think the best method would be to install the KB, trigger the reboot, start the script again and have a detection method to look in the registry for the KB - it will be in there.
If detection success, then move onto next KB to install, reboot and repeat etc.
Comments:
-
That would be a good way of doing it. We will be pushing out via the K1000. How do you get the PC to inventory on the next reboot. It seems the KB gets installed, a reboot happens, then the next KB gets installed at the next inventory (which can be a couple hours).
This is the first time we had to push a software that needed reboots through the K1000. - m698322h 8 years ago-
since you are using a batch to install you can add a line to add a registry entry to the runonce keyset that call runkbot 4 0 to force an inventory on reboot
reg.exe add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /v runkbot /d "C:\Program Files (x86)\Dell\KACE\runkbot 4 0"
https://support.software.dell.com/kb/147398 - SMal.tmcc 8 years ago-
That would work great if they did not have to log in. I would like the inventory to run upon startup. I'm getting close but there is 3 hours between installing each hot fix and the normal software. Takes over 12 hours to install something that should take 10 minutes. With that registry key, one has to login for the next iteration to take place. - m698322h 8 years ago
-
How about creating scheduled task to run the inventory after the update. You can get the batch to install the update, then create the task, then trigger the reboot. On next reboot, the task will run.
Keep in mind this is a deployment system, not a on demand patching system. - rileyz 8 years ago -
you can enable autologin for the duration of your install so it wiil install reboot autologin and then inventory, repeat till done - SMal.tmcc 8 years ago