Batch automatic system patching (batch installation of EXE file)

Time:2019-10-20

After installing the operating system, it takes the longest time to download patches and install patches. It usually takes half a day to download patches and install patches. Here are two ways to quickly install system patches:

Method 1: download the latest system patch with 360 security guard and save it in hotfix folder, create a new text file under the folder, and enter the following code:

Copy codeThe code is as follows:
@echo off
for %%i in (*.exe) do %%i /passive /norestart /nobackup
shutdown -r

Select Save as bunding.bat (pay attention to the format of batch file. In the Save As dialog box, select the save type as “all files”, and write the file name as bunding.bat completely. Save it). Put this file and all patch files in the same directory, and double-click to run it.

Installation parameter description:

/Quiet no user action or display
/Passive mode
/Norestart does not restart after installation
/Nobackup does not back up files needed for uninstall

Method 2: the patch program is placed in a drive letter of the mobile hard disk, including all patches from SP2 to March 11, 2007. There are 75 patches in total. The size is about 120m. Unfortunately, there is no FTP server. Otherwise, these patches and batch programs can be uploaded for everyone to download and use. Do not add the drive letter in the batch program, because the drive letter of the mobile hard disk is on different computers. It is different in. If the drive letter is involved, you need to modify the batch processing every time you use it, which is more troublesome.

Steps:
Start – run – enter CMD–
In command line mode
Enter the disk letter of the patch (e.g. disk E) and enter: e:
Enter the directory where the patch is located (such as fix) and enter: CD hotfix.
Command dir / B / O-D e: \ fix > fix.txt

The above command line means only extract the file names of all files in the “E: \ fix” directory and save them in fix.txt
The parameter “/ b” means not to display the header information and statistical information of the file. The parameter / O-D requires the file names to be sorted in chronological order (Note: there is a sequence for the installation of patches, the old ones must be installed before the new ones are installed). Then open fix.txt, and the contents are roughly in the following form:
WindowsXP-KB927802-x86-CHS.exe
WindowsXP-KB928843-x86-CHS.exe
WindowsXP-KB927779-x86-CHS.exe
WindowsXP-KB926436-x86-CHS.exe
WindowsXP-KB924667-x86-CHS.exe
WindowsXP-KB918118-x86-CHS.exe

Modify it by finding / replacing:
start /wait      WindowsXP-KB927802-x86-CHS.exe     /U /Q /Z
start /wait     WindowsXP-KB928843-x86-CHS.exe     /U /Q /Z
start /wait     WindowsXP-KB927779-x86-CHS.exe /U /Q /Z

Description: “start” is a DOS command of windows system, which is used to call applications; “wait” means to enable applications and wait for the end of them before executing the next application; “U” means to use unattended mode, “Q” means no user interaction, “Z” means not to restart the computer when the installation is completed.
Finally, fix.txt is changed to fix.bat, so that a batch program for fully automatic patch installation is completed.