Batch script for getting windows KB patch status which is installed in system or not.
By using "systeminfo" command we can get the OS information.
Command : systeminfo | find "KB Name".
Batch script:
1. create batch file "patchstatus.bat".
2. paste the below code in batch.
CALL systeminfo |findstr "KB2849697">>"C:\response.txt"
EXIT
3. save the file and run it. you can see the result in "response.txt" file if it found we will get response like below statement or if not installed it will show empty statement.
[01]: KB2849697
By using "systeminfo" command we can get the OS information.
Command : systeminfo | find "KB Name".
Batch script:
1. create batch file "patchstatus.bat".
2. paste the below code in batch.
CALL systeminfo |findstr "KB2849697">>"C:\response.txt"
EXIT
3. save the file and run it. you can see the result in "response.txt" file if it found we will get response like below statement or if not installed it will show empty statement.
[01]: KB2849697
No comments:
Post a Comment