The two >NUL in the statement "rmdir /S /Q %mhnet% 2>NUL 1>NUL" are used to redirect error output and standard output respectively to the null device. Specifically, 2>NUL redirects the error output (standard error) to the null device, and 1>NUL redirects the standard output to the null device, which means that the error and output information generated by the rmdir command will not be displayed on the screen.
The following is the translated content of the entire batch file related part:
I downloaded an automatic upgrade batch file from Huada Technology. What does the two >NUL in the statement like rmdir /S /Q %mhnet% 2>NUL 1>NUL mean? I don't understand very well. Please ask experts for advice, thank you!
---------- Edited by willsort ----------
Modified original title: Ask: Batch file statement problem?
---------- Edited by willsort ----------
Ask: Batch file statement problem?
The original file is as follows:
@echo offrem Usage introduction
rem Function: Try to set up automatic connection to Huazhong University of Science and Technology Windows Update server
rem First perform service check, for the machine without the installed service, install the service first, restart and then modify the settings
echo For Windows 2000,Windows XP,Windows 2003 only.
echo Only applicable on Windows 2000,Windows XP,Windows 2003
echo For Normal user only (computer that runs every day)
set Server=0
rem Server=1
pause
cls
rem Create temporary folder
set mhnet=%temp%\mhnet
rmdir /S /Q %mhnet% 2>NUL 1>NUL
mkdir %mhnet%
rem System language environment judgment
reg query HKLM\SYSTEM\CurrentControlSet\Control\Nls\Language >%mhnet%\Language.log
find "Default" %mhnet%\Language.log |find "0804" >NUL
IF NOT ERRORLEVEL 1 (
set Language=Chinese
) else (
set Language=English
)
if %Language%==Chinese (
echo This program is specially designed to set up Huazhong University of Science and Technology Windows Automatic Updates service
) else (
echo This will setup HUST Windows Automatic Updates Services
)
start readme.txt
rem Check the integrity of supporting files
call :AllFiles
rem Check if it belongs to NT series
call :CheckSystem
rem Check if it has administrator privileges
call :CheckAdmin
rem Check if the Automatic Updates service is normally installed
call :CheckService
call :HUSTRegImport
if %Language%==Chinese (
echo For program discussion, welcome to bbs.whnet.edu.cn security version
echo Program ends
) else (
echo We welcome you to press your opinion on bbs.whnet board:security
echo Program Exit
)
pause
set mhnet=
set patchfile=
set downloadurl=
goto :eof
exit
:ends
rem Main function ends
rem *************************
rem *************************
rem Import: HUSTRegImport
rem *************************
rem *************************
:HUSTRegImport
ECHO Backup registry (Backup Reg) %temp%
pushd %temp%
set BakFile1=AutoUpdateBak1.reg
set BakFile2=AutoUpdateBak2.reg
if exist %BakFile1% (
ECHO This patch has been installed, press any key to delete the original backup
PAUSE
delete %BakFile1% /f /q >NUL 2>NUL
delete %BakFile2% /f /q >NUL 2>NUL
)
popd
pushd %mhnet%
reg EXPORT "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" %BakFile1% 1>NUL
reg EXPORT "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" %BakFile2% 1>NUL
move %BakFile1% %temp% >NUL
move %BakFile2% %temp% >NUL
set BakFile1=
set BakFile2=
popd
ECHO Stopping WindowsUpdate service (Stopping Update service)......
net stop wuauserv >NUL 2>NUL
ECHO Modifying registry operation (Modifying Registry)......
ECHO Y |reg DELETE "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /va /f >NUL
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate /v WUServer /t REG_SZ /d "http://windowsupdate.hust.edu.cn" /f >NUL
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate /v WUStatusServer /t REG_SZ /d "http://windowsupdate.hust.edu.cn" /f >NUL
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU /v NoAutoRebootWithLoggedOnUsers /t REG_DWORD /d 1 /f >NUL
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU /v NoAutoUpdate /t REG_DWORD /d 0 /f >NUL
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU /v RescheduleWaitTime /t REG_DWORD /d 1 /f >NUL
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU /v ScheduledInstallDay /t REG_DWORD /d 0 /f >NUL
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU /v UseWUServer /t REG_DWORD /d 1 /f >NUL
if %Server%==1 (
ECHO Automatic Updates Service installed for server
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU /v AUOptions /t REG_DWORD /d 4 /f >NUL
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU /v ScheduledInstallTime /t REG_DWORD /d 11 /f >NUL
) else (
ECHO Automatic Updates Service installed for non-server
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU /v AUOptions /t REG_DWORD /d 2 /f >NUL
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU /v ScheduledInstallTime /t REG_DWORD /d 12 /f >NUL
)
rem Set the service to start automatically
ECHO Set service to automatic start (Set service to automatic start)
reg add HKLM\SYSTEM\CurrentControlSet\Services\wuauserv /v Start /t REG_DWORD /d 2 /f >NUL
reg add HKLM\SYSTEM\CurrentControlSet\Services\BITS /v Start /t REG_DWORD /d 2 /f >NUL
ECHO Restarting WindowsUpdate service (Starting Update Service)......
net start bits >NUL 2>NUL
net start wuauserv >NUL 2>NUL
goto :eof
rem *************************
rem *************************
rem Stop/delete service function
rem *************************
rem *************************
:StopService
set SrvName=%1
net stop %SrvName% >NUL >NUL2
reg query HKLM\SYSTEM\CurrentControlSet\Services\\%SrvName% >NUL
if not errorlevel 1 (
reg delete HKLM\SYSTEM\CurrentControlSet\Services\\%SrvName% /f >NUL
) ELSE (
if %Language%==Chinese (
echo System service: %SrvName% *not found*
) else (
echo System Service: %SrvName% Not Found
)
)
goto :eof
rem *************************
rem *************************
rem Judge whether it is an NT series system, and exit for win9x system
rem *************************
rem *************************
:CheckSystem
if NOT %OS%==Windows_NT (
if %Language%==Chinese (
echo This program is specially designed for Chinese/English version of Win2000, WinXP, Win2003
echo Users of Windows 95, Windows 98, Windows ME do not need to run
echo Program exit.
) else (
echo Design for Win2k,WinXP,Win2003 with Chinese or English version only.
echo Windows 95,Windows 98, Windows ME will not be troubled by this bug.
echo Thank you for checking. Please deliver this to someone who need it.
)
pause
exit
) else (
if %Language%==Chinese (
echo The user is using a system based on WindowsNT kernel,
) else (
echo You are using a system based on WindowsNT kernel,
)
)
goto :eof
rem *************************
rem *************************
rem Judge whether it is an NT series system, and exit for win9x system
rem *************************
rem *************************
:CheckAdmin
net user %username% 1> %mhnet%\ifadmin.log
rem If it is not a system administrator
find "*Administrators " %mhnet%\ifadmin.log >NUL
IF ERRORLEVEL 1 (
if %Language%==Chinese (
echo The user is not a member of the system administrator group, and cannot execute the corresponding program
echo Please change to a user with sufficient privileges to re-run this program
) else (
echo This program require administrator right to continue
echo Please switch user and try again
)
pause
exit
goto :eof
) else (
if %Language%==Chinese (
echo The user belongs to the system administrator group,
) else (
echo You have got the right of administrator,
)
)
goto :eof
rem *************************
rem *************************
rem First perform patch check, for the machine without installed patch, install the patch first, restart and then kill the virus
rem *************************
rem *************************
:CheckService
rem if %Language%==Chinese (
rem echo Checking Automatic Updates
rem ) else (
rem echo Checking Automatic Updates Service
rem )
rem Check the registry value of the service
reg query "HKLM\SYSTEM\CurrentControlSet\Services" >%mhnet%\Services.log
find "wuauserv" %mhnet%\Services.log >NUL
IF ERRORLEVEL 1 (
rem Your computer has not installed the Automatic updates service
call :InstallService
pause
exit
rem Abort execution
) ELSE (
rem if %Language%==Chinese (
rem echo Registry check shows that your system has installed the wuauserv service.
rem ) else (
rem echo reg reports that your system has wuauserv service installed
rem )
)
goto :eof
rem *************************
rem *************************
rem Clear a \Run value in the registry
rem *************************
rem *************************
:CleanRun
reg delete HKLM\Software\Microsoft\Windows\CurrentVersion\Run\\%1 /f >NUL
goto :eof
rem *************************
rem *************************
rem Stop unsafe service
rem *************************
rem *************************
:StopUnSafeSrv
rem net stop %1 >NUL
reg add HKLM\SYSTEM\CurrentControlSet\Services\\%1 /v Start /t REG_DWORD /d 0x3 /f >NUL
goto :eof
rem *************************
rem *************************
rem Import the execute file association of the normal registry
rem *************************
rem *************************
:Regdefault
reg import regdefault.reg >NUL
goto :eof
rem *************************
rem *************************
rem Install wuauserv package
rem *************************
rem *************************
:InstallService
rem reg query HKLM\SYSTEM\CurrentControlSet\Control\Nls\Language >%mhnet%\Language.log
rem Chinese system
find "InstallLanguage" %mhnet%\Language.log |find "0804" >NUL
IF NOT ERRORLEVEL 1 (CALL :CNService )
rem English system
find "InstallLanguage" %mhnet%\Language.log |find "0409" >NUL
IF NOT ERRORLEVEL 1 (CALL :ENService )
rem Other language packs, although the above language packs are called by call, but do not want to return
if %Language%==Chinese (
echo You are not using a Chinese/English operating system,
echo Please write down the displayed InstallLanguage and Default values below, and download the corresponding service from the Microsoft website
echo Program exit
) else (
echo You are not using windows with Chinese/English language
echo We suggest you download the service from microsoft website.
echo Please write down the InstallLanguage & Default value for later use.
echo program terminated
)
find "InstallLanguage" %mhnet%\Languate.log
start http://www.microsoft.com/downloads/details.aspx?FamilyID=799432fb-c196-4f01-8cce-4f9ea58d6177&DisplayLang=en
rem Microsoft service installation web page
pause
exit
goto :eof
rem *************************
rem *************************
rem Chinese service package download and installation
rem *************************
rem *************************
:CNService
set patchfile=WUAU22CHS.msi
set downloadurl=http://windowsupdate.hust.edu.cn/patch/%patchfile%
call
ownload
start %mhnet%\%patchfile%
if %Language%==Chinese (
echo Restart the computer after installing the service, and then run this program
) else (
echo Restart your computer when Service installation is done. And run again.
)
pause
exit
goto :eof
rem *************************
rem *************************
rem English service package download and installation
rem *************************
rem *************************
:ENService
set patchfile=WUAU22ENU.msi
set downloadurl=http://windowsupdate.hust.edu.cn/patch/%patchfile%
call
ownload
start %mhnet%\%patchfile%
if %Language%==Chinese (
echo Restart the computer after installing the service, and then run this program
) else (
echo Restart your computer when Service installation is done. And run again.
)
pause
exit
goto :eof
rem *************************
rem *************************
rem Check the integrity of some files
rem *************************
rem *************************
:AllFiles
if not exist reg.exe (
echo reg.exe NOT FOUND
pause
exit
) else (
copy reg.exe %mhnet% /y >NUL
)
if not exist wget.exe (
echo wget.exe NOT FOUND
pause
exit
) else (
copy wget.exe %mhnet% /y >NUL
)
goto :eof
rem *************************
rem *************************
rem Download patch, pass in file name with %patchfile%
rem *************************
rem *************************
ownload
if %Language%==Chinese (
echo Automatically download %downloadurl%
) else (
echo Downloading %downloadurl%
)
pushd %mhnet%
if exist %patchfile% (
del %patchfile% /f /q >NUL 2>NUL
)
wget %downloadurl%
IF NOT ERRORLEVEL 1 (
if %Language%==Chinese (
echo Download successful.
) else (
echo Download Success
)
) else (
if %Language%==Chinese (
echo Download failed. Program exit
) else (
echo Download Failed. Terminated
)
pause
exit
)
popd
goto :eof
rem ----- this is the end of this batch file -------
[ Last edited by willsort on 2006-5-13 at 18:28 ]
The following is the translated content of the entire batch file related part:
I downloaded an automatic upgrade batch file from Huada Technology. What does the two >NUL in the statement like rmdir /S /Q %mhnet% 2>NUL 1>NUL mean? I don't understand very well. Please ask experts for advice, thank you!
---------- Edited by willsort ----------
Modified original title: Ask: Batch file statement problem?
---------- Edited by willsort ----------
Ask: Batch file statement problem?
The original file is as follows:
@echo offrem Usage introduction
rem Function: Try to set up automatic connection to Huazhong University of Science and Technology Windows Update server
rem First perform service check, for the machine without the installed service, install the service first, restart and then modify the settings
echo For Windows 2000,Windows XP,Windows 2003 only.
echo Only applicable on Windows 2000,Windows XP,Windows 2003
echo For Normal user only (computer that runs every day)
set Server=0
rem Server=1
pause
cls
rem Create temporary folder
set mhnet=%temp%\mhnet
rmdir /S /Q %mhnet% 2>NUL 1>NUL
mkdir %mhnet%
rem System language environment judgment
reg query HKLM\SYSTEM\CurrentControlSet\Control\Nls\Language >%mhnet%\Language.log
find "Default" %mhnet%\Language.log |find "0804" >NUL
IF NOT ERRORLEVEL 1 (
set Language=Chinese
) else (
set Language=English
)
if %Language%==Chinese (
echo This program is specially designed to set up Huazhong University of Science and Technology Windows Automatic Updates service
) else (
echo This will setup HUST Windows Automatic Updates Services
)
start readme.txt
rem Check the integrity of supporting files
call :AllFiles
rem Check if it belongs to NT series
call :CheckSystem
rem Check if it has administrator privileges
call :CheckAdmin
rem Check if the Automatic Updates service is normally installed
call :CheckService
call :HUSTRegImport
if %Language%==Chinese (
echo For program discussion, welcome to bbs.whnet.edu.cn security version
echo Program ends
) else (
echo We welcome you to press your opinion on bbs.whnet board:security
echo Program Exit
)
pause
set mhnet=
set patchfile=
set downloadurl=
goto :eof
exit
:ends
rem Main function ends
rem *************************
rem *************************
rem Import: HUSTRegImport
rem *************************
rem *************************
:HUSTRegImport
ECHO Backup registry (Backup Reg) %temp%
pushd %temp%
set BakFile1=AutoUpdateBak1.reg
set BakFile2=AutoUpdateBak2.reg
if exist %BakFile1% (
ECHO This patch has been installed, press any key to delete the original backup
PAUSE
delete %BakFile1% /f /q >NUL 2>NUL
delete %BakFile2% /f /q >NUL 2>NUL
)
popd
pushd %mhnet%
reg EXPORT "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" %BakFile1% 1>NUL
reg EXPORT "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" %BakFile2% 1>NUL
move %BakFile1% %temp% >NUL
move %BakFile2% %temp% >NUL
set BakFile1=
set BakFile2=
popd
ECHO Stopping WindowsUpdate service (Stopping Update service)......
net stop wuauserv >NUL 2>NUL
ECHO Modifying registry operation (Modifying Registry)......
ECHO Y |reg DELETE "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /va /f >NUL
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate /v WUServer /t REG_SZ /d "http://windowsupdate.hust.edu.cn" /f >NUL
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate /v WUStatusServer /t REG_SZ /d "http://windowsupdate.hust.edu.cn" /f >NUL
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU /v NoAutoRebootWithLoggedOnUsers /t REG_DWORD /d 1 /f >NUL
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU /v NoAutoUpdate /t REG_DWORD /d 0 /f >NUL
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU /v RescheduleWaitTime /t REG_DWORD /d 1 /f >NUL
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU /v ScheduledInstallDay /t REG_DWORD /d 0 /f >NUL
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU /v UseWUServer /t REG_DWORD /d 1 /f >NUL
if %Server%==1 (
ECHO Automatic Updates Service installed for server
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU /v AUOptions /t REG_DWORD /d 4 /f >NUL
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU /v ScheduledInstallTime /t REG_DWORD /d 11 /f >NUL
) else (
ECHO Automatic Updates Service installed for non-server
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU /v AUOptions /t REG_DWORD /d 2 /f >NUL
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU /v ScheduledInstallTime /t REG_DWORD /d 12 /f >NUL
)
rem Set the service to start automatically
ECHO Set service to automatic start (Set service to automatic start)
reg add HKLM\SYSTEM\CurrentControlSet\Services\wuauserv /v Start /t REG_DWORD /d 2 /f >NUL
reg add HKLM\SYSTEM\CurrentControlSet\Services\BITS /v Start /t REG_DWORD /d 2 /f >NUL
ECHO Restarting WindowsUpdate service (Starting Update Service)......
net start bits >NUL 2>NUL
net start wuauserv >NUL 2>NUL
goto :eof
rem *************************
rem *************************
rem Stop/delete service function
rem *************************
rem *************************
:StopService
set SrvName=%1
net stop %SrvName% >NUL >NUL2
reg query HKLM\SYSTEM\CurrentControlSet\Services\\%SrvName% >NUL
if not errorlevel 1 (
reg delete HKLM\SYSTEM\CurrentControlSet\Services\\%SrvName% /f >NUL
) ELSE (
if %Language%==Chinese (
echo System service: %SrvName% *not found*
) else (
echo System Service: %SrvName% Not Found
)
)
goto :eof
rem *************************
rem *************************
rem Judge whether it is an NT series system, and exit for win9x system
rem *************************
rem *************************
:CheckSystem
if NOT %OS%==Windows_NT (
if %Language%==Chinese (
echo This program is specially designed for Chinese/English version of Win2000, WinXP, Win2003
echo Users of Windows 95, Windows 98, Windows ME do not need to run
echo Program exit.
) else (
echo Design for Win2k,WinXP,Win2003 with Chinese or English version only.
echo Windows 95,Windows 98, Windows ME will not be troubled by this bug.
echo Thank you for checking. Please deliver this to someone who need it.
)
pause
exit
) else (
if %Language%==Chinese (
echo The user is using a system based on WindowsNT kernel,
) else (
echo You are using a system based on WindowsNT kernel,
)
)
goto :eof
rem *************************
rem *************************
rem Judge whether it is an NT series system, and exit for win9x system
rem *************************
rem *************************
:CheckAdmin
net user %username% 1> %mhnet%\ifadmin.log
rem If it is not a system administrator
find "*Administrators " %mhnet%\ifadmin.log >NUL
IF ERRORLEVEL 1 (
if %Language%==Chinese (
echo The user is not a member of the system administrator group, and cannot execute the corresponding program
echo Please change to a user with sufficient privileges to re-run this program
) else (
echo This program require administrator right to continue
echo Please switch user and try again
)
pause
exit
goto :eof
) else (
if %Language%==Chinese (
echo The user belongs to the system administrator group,
) else (
echo You have got the right of administrator,
)
)
goto :eof
rem *************************
rem *************************
rem First perform patch check, for the machine without installed patch, install the patch first, restart and then kill the virus
rem *************************
rem *************************
:CheckService
rem if %Language%==Chinese (
rem echo Checking Automatic Updates
rem ) else (
rem echo Checking Automatic Updates Service
rem )
rem Check the registry value of the service
reg query "HKLM\SYSTEM\CurrentControlSet\Services" >%mhnet%\Services.log
find "wuauserv" %mhnet%\Services.log >NUL
IF ERRORLEVEL 1 (
rem Your computer has not installed the Automatic updates service
call :InstallService
pause
exit
rem Abort execution
) ELSE (
rem if %Language%==Chinese (
rem echo Registry check shows that your system has installed the wuauserv service.
rem ) else (
rem echo reg reports that your system has wuauserv service installed
rem )
)
goto :eof
rem *************************
rem *************************
rem Clear a \Run value in the registry
rem *************************
rem *************************
:CleanRun
reg delete HKLM\Software\Microsoft\Windows\CurrentVersion\Run\\%1 /f >NUL
goto :eof
rem *************************
rem *************************
rem Stop unsafe service
rem *************************
rem *************************
:StopUnSafeSrv
rem net stop %1 >NUL
reg add HKLM\SYSTEM\CurrentControlSet\Services\\%1 /v Start /t REG_DWORD /d 0x3 /f >NUL
goto :eof
rem *************************
rem *************************
rem Import the execute file association of the normal registry
rem *************************
rem *************************
:Regdefault
reg import regdefault.reg >NUL
goto :eof
rem *************************
rem *************************
rem Install wuauserv package
rem *************************
rem *************************
:InstallService
rem reg query HKLM\SYSTEM\CurrentControlSet\Control\Nls\Language >%mhnet%\Language.log
rem Chinese system
find "InstallLanguage" %mhnet%\Language.log |find "0804" >NUL
IF NOT ERRORLEVEL 1 (CALL :CNService )
rem English system
find "InstallLanguage" %mhnet%\Language.log |find "0409" >NUL
IF NOT ERRORLEVEL 1 (CALL :ENService )
rem Other language packs, although the above language packs are called by call, but do not want to return
if %Language%==Chinese (
echo You are not using a Chinese/English operating system,
echo Please write down the displayed InstallLanguage and Default values below, and download the corresponding service from the Microsoft website
echo Program exit
) else (
echo You are not using windows with Chinese/English language
echo We suggest you download the service from microsoft website.
echo Please write down the InstallLanguage & Default value for later use.
echo program terminated
)
find "InstallLanguage" %mhnet%\Languate.log
start http://www.microsoft.com/downloads/details.aspx?FamilyID=799432fb-c196-4f01-8cce-4f9ea58d6177&DisplayLang=en
rem Microsoft service installation web page
pause
exit
goto :eof
rem *************************
rem *************************
rem Chinese service package download and installation
rem *************************
rem *************************
:CNService
set patchfile=WUAU22CHS.msi
set downloadurl=http://windowsupdate.hust.edu.cn/patch/%patchfile%
call
ownloadstart %mhnet%\%patchfile%
if %Language%==Chinese (
echo Restart the computer after installing the service, and then run this program
) else (
echo Restart your computer when Service installation is done. And run again.
)
pause
exit
goto :eof
rem *************************
rem *************************
rem English service package download and installation
rem *************************
rem *************************
:ENService
set patchfile=WUAU22ENU.msi
set downloadurl=http://windowsupdate.hust.edu.cn/patch/%patchfile%
call
ownloadstart %mhnet%\%patchfile%
if %Language%==Chinese (
echo Restart the computer after installing the service, and then run this program
) else (
echo Restart your computer when Service installation is done. And run again.
)
pause
exit
goto :eof
rem *************************
rem *************************
rem Check the integrity of some files
rem *************************
rem *************************
:AllFiles
if not exist reg.exe (
echo reg.exe NOT FOUND
pause
exit
) else (
copy reg.exe %mhnet% /y >NUL
)
if not exist wget.exe (
echo wget.exe NOT FOUND
pause
exit
) else (
copy wget.exe %mhnet% /y >NUL
)
goto :eof
rem *************************
rem *************************
rem Download patch, pass in file name with %patchfile%
rem *************************
rem *************************
ownloadif %Language%==Chinese (
echo Automatically download %downloadurl%
) else (
echo Downloading %downloadurl%
)
pushd %mhnet%
if exist %patchfile% (
del %patchfile% /f /q >NUL 2>NUL
)
wget %downloadurl%
IF NOT ERRORLEVEL 1 (
if %Language%==Chinese (
echo Download successful.
) else (
echo Download Success
)
) else (
if %Language%==Chinese (
echo Download failed. Program exit
) else (
echo Download Failed. Terminated
)
pause
exit
)
popd
goto :eof
rem ----- this is the end of this batch file -------
[ Last edited by willsort on 2006-5-13 at 18:28 ]

DigestI