Since Windows XP Service Pack 3 released, we might need to install the critical hotfixes ourselves. There are several ways to install hotfixes. We can search for “windows offline update” from internet.
But, I personally prefer go to The Software Patch, and download manually. Because I can download whatever I like. However, installing those hotfixes manually is troublesome. Then I wrote a batch file to install the hotfixes automatically. But I need to update the batch file whenever I download new hotfixes. Finally, I found a good solution.
I wrote a batch file as following:
if not exist c:\temp mkdir c:\temp
dir /o /b /s *.exe > c:\temp\temp.txt
for /f %%i in (c:\temp\temp.txt) do %%i /passive /norestart
And put this batch file under the same directory with the hotfixes. Run it, everything okay.
I will explain the algorithm:
1) Make a directory “c:\temp”
2) Display all *.exe within the current directory. Assuming there are only hotfixes .exe, no other .exe files. And save the list of .exe to “c:\temp\temp.txt”
3) Read the “c:\temp\temp.txt”, for every line of the temp.txt is a hotfix .exe file, then run the .exe with the parameter “passive” and “norestart”, so that silent installation without restart is performed.
4) Finally, delete the “temp.txt”