Some readers have reported a problem with using the batch Windows Auto Upgrade file. Some patch packages have an error message during installation and cannot be continued.
After research, it was found that this is because Windows mainly has two different types of patches, which need to use different parameters. Once the parameters are wrong, it will not be installed, so different parameters are required for different patches. Let's analyze it in detail.
See the patch type from the picture
As shown in Figure 1, put the Windows 2003 Server patch file in the same directory,
you can clearly see the name of the patch file in front of it. There are two types of icons, one is a simple executable icon, and the other is an executable icon that marks the compressed file.
From the Attribute Analysis Format
The icon for the WindowsServer2003-KB823559-x86-ENU.exe file is a simple executable icon. You can see the help information for this patch from Figure 2 and found that it uses the Microsoft update program to install the patch. The version information of the patch can be viewed from Figure 3. It is made by SFXCAB.EXE, and all other patches with common executable file icons have similar properties.
The icon for the DirectX9-KB819696-x86-ENU.exe file is an executable file icon for the compressed file. You can view the help information for the patch. The parameters it recognizes do not include /U and /Z, and if you use the /U parameter to run it will generate an error. Similarly, looking at the version information of the patch, it can be seen that the DirectX9-KB819696-x86-ENU patch is derived from WEXTRACT.EXE, and all other patches with executable file icons with flag compressed files have similar characteristics. .
It is now clear that Windows has two different types of patches, different patches, and different parameters.
Automatically distinguishing patch formats
How do you distinguish between these two different types of patches in a batch file? The most secure way is to find a small program to detect the patch file resource information. If the patch resource includes an executable file icon that marks the compressed file, then the patch is the second type of patch, only the /Q parameter is used, if the patch resource is Excluding the icon, then the first type of patch, you can use the /U /Q /Z parameters to install the patch.
Here is an easier way to use only Windows internal commands, no additional programs are required. Find the feature string in the patch file. If a string exists only in a certain type of patch, you can distinguish the type of patch based on this.
Step 1: As shown in Figure 4, open the WindowsServer2003-
KB823559-x86-ENU.exe file and the DirectX9-KB819696-x86-ENU.exe file with a text editor. Many feature strings, such as the string "_SFX_CAB_EXE_PATH", exist only in the patch of the SFXCAB.EXE type, while the strings "CABINET" and "WEXTRACT" are only present in the patch file of the WEXTRACT.EXE type. So you can use the method of finding a string to determine the type of patch file.
Step 2: Enter “cmd” in the &startquo;run"run" menu, and then go to the folder where the patch is located, run the following command, you can specify the parameters required for the patch file:
(@findstr _SFX_CAB_EXE_PATH patch file name >nul && @echo parameter /U /Q /Z)
When deploying a network, we usually use a router to connect to different networks. The preferred de
For how to create a Windows Server 2008 virtual machine, you can refer to the previous article (clic
This document applies to the installation, configuration, and use of MongoDB 2.0.1 on Windows 2003.
A popular phrase in the previous period, meat machine, in fact, if you want to control the remote co
Windows 2003 system accelerates 14 strokes Dafa
Some questions about installing mysql under win2000!, MYSQL database
How to achieve network sharing restore in Win2003
Win2008 uses shadow copy to achieve on-demand recovery
Windows 2008 Server Data Security
Win2000 optimized full version
Win 2003 Group Policy and Security Template Application
Thoroughly eliminate WinXP and 2000 mutual access issues
MZD uses win2008 system to do the settings and optimization
Three ways to easily cancel the Windows 2003 shutdown prompt
Win7 how to boot acceleration Optimize Win7 boot time
Windows XP computer restarts repeatedly because of the reason and solution
What should I do if the NAS storage failure causes Linux to fail to start properly?
Win10 unlocks the registry editor method
Win10 preview version installation method Daquan
No need to wait until the hair
How to make the media center support more video formats
How to open Dat file in Win7 system How to open Dat file in Win7 system
How to close the windows7 automatic scan installation driver function