不知道98的补丁文件名是啥模样,网上搜索了一通,发现了一段代码比较有用,修改之后,得到如下代码,不知道能不能在98下成功运行:
@echo off
goto begin
把本脚本放在补丁目录下直接运行
注意:补丁目录下的1 2 3 4文件夹将被全新创建,请保证这四个文件夹内没有重要资料
本脚本主体代码来源于网络,jm于2006-8-15进行了部分修改
号称for 98/ME/2000/XP/2003
只测试了XP和2003的系统
:begin
title 系统补丁自动安装程序
color 1f
md 1 2 3 4 >nul 2>nul
for %%i in (*.exe) do (
(echo %%i|findstr "updfile">nul 2>nul && move %%i 1) || (
echo %%i|findstr "_sfx_cab_exe_package">nul 2>nul && move %%i 2) || (
echo %%i|findstr "update.exe">nul 2>nul && move %%i 3) || (
echo %%i|findstr "_sfx_cab_exe_path">nul 2>nul && move %%i 4)
)
If not exist *.exe (goto auto_install) else (goto list)
:list
echo.
echo ========================================================
echo.
for %%i in (*.exe) do echo %%i 需要手动安装
echo.
echo ========================================================
echo.
echo 当可自动安装的补丁安装完毕之后,请手动安装上述补丁
:auto_install
echo.
echo ========================================================
echo.
echo 所有可自动安装的补丁已经被分别放在 目录 1 2 3 4 中。
echo.
echo 按任意键继续...
pause>nul
cd /d 1
for %%i in (*.exe) do start /wait %%i /q
cd /d 2
for %%i in (*.exe) do start /wait %%i /passive /norestart /o /n
cd /d 3
for %%i in (*.exe) do start /wait %%i -n -o -z
cd /d 4
for %%i in (*.exe) do start /wait %%i /passive /norestart /o /n
Last edited by namejm on 2006-11-17 at 04:36 PM ]
I don't know what the patch file name for 98 looks like. I searched online and found a section of code that is relatively useful. After modification, the following code is obtained. I don't know if it can run successfully under 98:
@echo off
goto begin
Put this script directly in the patch directory and run it
Note: The folders 1, 2, 3, 4 in the patch directory will be newly created. Please ensure that there are no important materials in these four folders
The main code of this script is from the Internet. jm made some modifications on 2006-8-15
Claimed for 98/ME/2000/XP/2003
Only tested on XP and 2003 systems
:begin
title System Patch Automatic Installation Program
color 1f
md 1 2 3 4 >nul 2>nul
for %%i in (*.exe) do (
(echo %%i|findstr "updfile">nul 2>nul && move %%i 1) || (
echo %%i|findstr "_sfx_cab_exe_package">nul 2>nul && move %%i 2) || (
echo %%i|findstr "update.exe">nul 2>nul && move %%i 3) || (
echo %%i|findstr "_sfx_cab_exe_path">nul 2>nul && move %%i 4)
)
If not exist *.exe (goto auto_install) else (goto list)
:list
echo.
echo ========================================================
echo.
for %%i in (*.exe) do echo %%i needs to be installed manually
echo.
echo ========================================================
echo.
echo When the patches that can be installed automatically are installed, please install the above patches manually
:auto_install
echo.
echo ========================================================
echo.
echo All patches that can be installed automatically have been placed in directories 1, 2, 3, 4 respectively.
echo.
echo Press any key to continue...
pause>nul
cd /d 1
for %%i in (*.exe) do start /wait %%i /q
cd /d 2
for %%i in (*.exe) do start /wait %%i /passive /norestart /o /n
cd /d 3
for %%i in (*.exe) do start /wait %%i -n -o -z
cd /d 4
for %%i in (*.exe) do start /wait %%i /passive /norestart /o /n
Last edited by namejm on 2006-11-17 at 04:36 PM ]