关闭自动更新微软原文:
Important This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986 Description of the Microsoft Windows Registry
SUMMARY
If you are logged on as a Computer Administrator or a member of the Administrators group, you may be prompted from the notification area of the taskbar to configure the Automatic Updates feature in Windows.
For additional information about the availability of the Automatic Updates feature and how to configure and use it, click the following article numbers to view the articles in the Microsoft Knowledge Base:
306525 How to configure and use Automatic Updates in Windows XP
327850 How to configure and use Automatic Updates in Windows 2000
Advanced users and IT Professionals can also configure Automatic Updates by using Group Policy, using Windows NT 4.0 System Policy, or by modifying registry settings. This article describes how to configure the Automatic Updates features by using Group Policy or registry settings.
For additional information about configuring Automatic Updates on your network, see the Software Update Services Deployment white paper. To view this white paper, visit the following Microsoft Web site:
http://go.microsoft.com/fwlink/?linkid=6928
MORE INFORMATION
Configuring Automatic Updates by using local Group Policy
Click Start, and then click Run.
Type gpedit.msc, and then click OK.
In the Group Policy snap-in, expand Computer Configuration.
Right-click Administrative Templates, and then click Add/Remove Templates.
Click Add, click Wuau.adm in the Windows\Inf folder, and then click Open.
Click Close.
Under Computer Configuration, expand Administrative Templates, expand Windows Components, and then expand Windows Update.
The Configure Automatic Updates policy appears. This policy specifies whether the computer receives security updates and other important downloads through the Windows automatic updating service. The settings for this policy let you specify if automatic updates are enabled on the computer. If the service is enabled, you must select one of the three configuration options.
To view the policy settings, double-click the Configure Automatic Updates policy.
To turn on Automatic Updates, click Enabled in the list of options that appear at the top of the Setting tab.
If you click Enabled, you must select one of the three configuration options.
Select one of the following three options:
2 - Notify for download and notify for install
When Windows finds updates that apply to this computer, an icon appears in the notification area and a message appears that states the updates are ready to be downloaded. If you click either the icon or the message, the option that you use to select the updates you want to download appears. Windows downloads the selected updates in the background. When the download is complete, the icon appears in the notification area again and a message appears that states that the updates are ready to be installed. If you click either the icon or the message, the option that you use to select the updates you want to install appears.
3 - Auto download and notify for install
NOTE: This setting is the default setting.
Windows finds updates that apply to your computer and downloads these updates in the background (the user is not notified or interrupted during this process). When the download is complete, the icon appears in the notification area and a message that states that the updates are ready to be installed appears. If you click either the icon or the message, the option that you use to select the updates you want to install appears.
4 - Auto download and schedule the install
To specify the schedule, select the appropriate options in the Group Policy Settings dialog box. If you do not specify a schedule, the default schedule for all installations is used. This schedule is every day at 3:00 A.M. If any of the updates require you to restart the computer to complete the installation, Windows restarts the computer automatically. (If a user is logged on to the computer when Windows is ready to restart it, the user is notified that Windows will restart. The user can chose to delay the restart operation.)
If you select option 4, you can set a recurring schedule. If you do not set a schedule, all updates are downloaded and installed every day at 3:00 A.M.
Other Options
Additionally, you can select either the Disabled option or the Not Configured option. If you select Disabled, an administrator must download and install any available updates manually from the Microsoft Windows Update Web site.
If you select Not Configured, the status of Automatic Updates (enabled or not enabled) is not specified at the Group Policy level. However, an administrator can still configure Automatic Updates by using Control Panel. Control Panel includes the same settings that are available in Group Policy.
Note An updated Administrative Template (.adm file) is now available for use with the Automatic Updates feature in Windows Server 2003 and the Software Update Services (SUS) Service Pack 1 (SP1) client. This updated policy file adds two new policies:
Reschedule Automatic Updates scheduled installations
Specifies the time for Automatic Updates to wait, following system startup, before proceeding with a scheduled installation that was missed previously
No auto-restart for scheduled Automatic Updates installations
Specifies that to complete a scheduled installation, Automatic Updates will wait for the computer to be restarted by any user who is logged on, instead of causing the computer to restart automatically
The updated client and policy file is included in Windows Server 2003. To download the SUS SP1 client for Windows 2000- and Windows XP-based computers, visit the following Microsoft Web site:
http://www.microsoft.com/windows2000/downloads/recommended/susclient/default.asp
To download the updated Administrative Template for Windows 2000- and Windows XP-based computers, visit the following Microsoft Web site:
http://microsoft.com/downloads/details.aspx?FamilyId=D26A0AEA-D274-42E6-8025-8C667B4C94E9&displaylang=en
Loading policy settings by using Group Policy in Active Directory
You must use the Wuau.adm file that describes the new policy settings for the Automatic Updates client. Wuau.adm is automatically installed to the Windows\Inf folder when you install the new Automatic Updates feature.
You can load Windows\Inf\Wuau.adm as an administrative template in Group Policy Object Editor.
To load policy settings by using Group Policy in Active Directory:
On an Active Directory domain controller, click Start, and then click Run.
Type dsa.msc to load the Active Directory Users and Computers snap-in.
Right-click the organizational unit or domain in which you want to create the policy, and then click Properties.
Click the Group Policy tab, and then click New.
Type a name for the policy, and then click Edit.
Under either Computer Settings, right-click Administrative Templates.
Click Add/Remove Templates, and then click Add.
Type the name of the Automatic Updates .adm file, for example, windows_folder\inf\wuau.adm.
Click Open.
Configuring Automatic Updates by editing the registry
Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
In a non-Active Directory environment, you can edit registry settings to configure Automatic Updates.
NOTE: You must manually create these registry keys.
You can use either of the following methods to set these registry keys:
Manually edit the registry by using Regedit.exe.
Centrally deploy these registry keys by using the Windows NT 4.0-style System Policy functionality.
To use Registry Editor, follow these steps:
Click Start, click Run, and then type regedit in the Open box.
Locate and then click the following key in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU
Add any of the following settings:
Value name: NoAutoUpdate
Value data: 0 or 1
0: Automatic Updates is enabled (default).
1: Automatic Updates is disabled.
Registry Value Type: Reg_DWORD
Value name: AUOptions
Value data: 1 to 4
1: Keep my computer up to date has been disabled in Automatic Updates.
2: Notify of download and installation.
3: Automatically download and notify of installation.
4: Automatically download and scheduled installation.
Registry Value Type: Reg_DWORD
Value name: ScheduledInstallDay
Value data: 0 to 7
0: Every day.
1 through 7: The days of the week from Sunday (1) to Saturday (7).
Registry Value Type: Reg_DWORD
Value name: ScheduledInstallTime
Value data: n, where n equals the time of day in a 24-hour format (0-23).
Registry Value Type: Reg_DWORD
Value name: UseWUServer
Value data: Set this value to 1 to configure Automatic Updates to use a server that is running Software Update Services instead of Windows Update.
Registry Value Type: Reg_DWORD
Value name: RescheduleWaitTime
Value data: m, where m equals the amount of time (in minutes, 1-60, representing 1 minute to 60 minutes) to wait between the time Automatic Updates starts and the time it begins installations whose scheduled time has passed.
Registry Value Type: Reg_DWORD
Note This setting only affects client behavior after the clients have updated to the SUS SP1 client version or later.
Value name: NoAutoRebootWithLoggedOnUsers
Value data: Reg_DWORD: 0 (false) or 1 (true). If set to 1, Automatic Updates does not automatically restart a computer while users are logged on.
Registry Value Type: Reg_DWORD
Note This setting affects client behavior after the clients have updated to the SUS SP1 client version or later.
To use Automatic Updates with a server that is running Software Update Services, see the Software Update Services Deployment white paper. To view this white paper, visit the following Microsoft Web site:
http://go.microsoft.com/fwlink/?linkid=6928
Note When you configure Automatic Updates directly by using the policy registry keys, the policy overrides the preferences that are set by the local administrative user to configure the client. If an administrator removes the registry keys at a later date, the preferences that were set by the local administrative user are used again.
Note To determine the server that is running Software Update Services your client computers and servers go to for their updates, put the following two settings in the registry at this location:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\
WUServer sets the SUS server by HTTP name (for example, http://IntranetSUS). Registry Value Type: Reg_SZ
WUStatusServer sets the SUS statistics server by HTTP name (for example, http://IntranetSUS). Registry Value Type: Reg_SZ 作者: solomonyang 时间: 2004-7-23 16:55 标题: 没事做的windows xp全自动安装光盘 我学习批处理文件的第一篇文章:
DOS批处理文件
后缀是bat(cmd)的文件就是批处理文件,是一种文本文件。简单的说,它的作用就是自动的连续执行多条命令,批处理文件的内容就是一条一条的命令。那它有什么用呢?
比如,在启动wps软件时,每次都必须执行
C:\>cd wps
C:\WPS>spdos
C:\WPS>py
C:\WPS>wbx
C:\WPS>wps
如果每次用WPS之前都这样执行一次,您是不是觉得很麻烦呢?
如果有一个方法,只需编写一个批处理文件,就会自动执行刚才的所有命令,您想不想学呢?
当您看完此节,自己编写的第一个批处理文件顺利执行时,您一定会大吃一惊的。
此外电脑每次启动时都会寻找autoexec.bat这条批处理文件,从而可执行一些每次开机都要执行的命令,如设置路径path、加载鼠标驱动mouse、磁盘加速smartdrv等,可以使您的电脑真正自动化。
echo、@、call、pause、rem 是批处理文件最常用的几个命令,我们就从他们开始学起。 echo 表示显示此命令后的字符
echo off 表示在此语句后所有运行的命令都不显示命令行本身
@ 与echo off相象,但它是加在其它命令行的最前面,表示运行时不显示命令行本身。
call 调用另一条批处理文件(如果直接调用别的批处理文件 ,执行完那条文件后将无法执行当前文件后续命令)
pause 运行此句会暂停,显示Press any key to continue... 等待用户按任意键后继续
rem 表示此命令后的字符为解释行,不执行,只是给自己今后查找用的
例:用edit编辑a.bat文件,输入下列内容后存盘为c:\a.bat,执行该批处理文件后可实现:将根目录中所有文件写入 a.txt中,启动UCDOS,进入WPS等功能。
批处理文件的内容为: 文件表示:
echo off 不显示命令行
dir c:\*.* >a.txt 将c盘文件列表写入a.txt
call c:\ucdos\ucdos.bat 调用ucdos
echo 你好 显示"你好"
pause 暂停,等待按键继续
rem 使用wps 注释将使用wps
cd ucdos 进入ucdos目录
wps 使用wps
批处理文件中还可以像C语言一样使用参数,这只需用到一个参数表示符%。
%表示参数,参数是指在运行批处理文件时在文件名后加的字符串。变量可以从 %0到%9,%0表示文件名本身,字符串用%1到%9顺序表示。
例如,C:根目录下一批处理文件名为f.bat,内容为 format %1
则如果执行C:\>f a: 则实际执行的是format a:
又如C:根目录下一批处理文件的名为t.bat,内容为 type %1 type %2
那么运行C:\>t a.txt b.txt 将顺序地显示a.txt和b.txt文件的内容
if goto choice for 是批处理文件中比较高级的命令,如果这几个你用得很熟练,你就是批处理文件的专家啦。
if 表示将判断是否符合规定的条件,从而决定执行不同的命令。 有三种格式:
1、if "参数" == "字符串" 待执行的命令
参数如果等于指定的字符串,则条件成立,运行命令,否则运行下一句。(注意是两个等号)
如if "%1"=="a" format a:
2、if exist 文件名 待执行的命令
如果有指定的文件,则条件成立,运行命令,否则运行下一句。如if exist config.sys edit config.sys
3、if errorlevel 数字 待执行的命令
如果返回码等于指定的数字,则条件成立,运行命令,否则运行下一句。如if errorlevel 2 goto x2 DOS程序运行时都会返回一个数字给DOS,称为错误码errorlevel或称返回码
goto 批处理文件运行到这里将跳到goto 所指定的标号处, 一般与if配合使用。 如:
goto end
:end
echo this is the end
标号用 :字符串 表示,标号所在行不被执行
choice 使用此命令可以让用户输入一个字符,从而运行不同的命令。使用时应该加/c:参数,c:后应写提示可输入的字符,之间无空格。它的返回码为1234……
如: choice /c:dme defrag,mem,end
将显示
defrag,mem,end[D,M,E]?
例如,test.bat的内容如下:
@echo off
choice /c:dme defrag,mem,end
if errorlevel 3 goto defrag 应先判断数值最高的错误码
if errorlevel 2 goto mem
if errotlevel 1 goto end
:defrag
c:\dos\defrag
goto end
:mem
mem
goto end
:end
echo good bye
此文件运行后,将显示 defrag,mem,end[D,M,E]? 用户可选择d m e ,然后if语句将作出判断,d表示执行标号为defrag的程序段,m表示执行标号为mem的程序段,e表示执行标号为end的程序段,每个程序段最后都以goto end将程序跳到end标号处,然后程序将显示good bye,文件结束。
for 循环命令,只要条件符合,它将多次执行同一命令。
格式FOR [%%f] in (集合) DO [命令]
只要参数f在指定的集合内,则条件成立,执行命令
如果一条批处理文件中有一行:
for %%c in (*.bat *.txt) do type %%c
含义是如果是以bat或txt结尾的文件,则显示文件的内容。