网络经典命cmd命令

 

1.最基本,最常用的,测试物理网络的

ping 192.168.10.88 t ,参数-t是等待用户去中断测试

 

2.查看DNSIPMac

A.Win98winipcfg

B.Win2000以上:Ipconfig/all

 

C.NSLOOKUP:如查看河北的DNS

C:\>nslookup

Default Server: ns.hesjptt.net.cn

Address: 202.99.160.68

>server 202.99.41.2 则将DNS改为了41.2

> pop.pcpop.com

Server: ns.hesjptt.net.cn

Address: 202.99.160.68

 

Non-authoritative answer:

Name: pop.pcpop.com

Address: 202.99.160.212

 

3.网络信使

Net send 计算机名/IP|* (广播) 传送内容,注意不能跨网段

net stop messenger 停止信使服务,也可以在面板-服务修改

net start messenger 开始信使服务

 

4.探测对方对方计算机名,所在的组、域及当前用户名

ping a IP t ,只显示NetBios

nbtstat -a 192.168.10.146 比较全的

 

5.netstat -a 显示出你的计算机当前所开放的所有端口

netstat -s -e 比较详细的显示你的网络资料,包括TCPUDPICMP IP的统计等

 

6.探测arp绑定(动态和静态)列表,显示所有连接了我的计算机,显示对方IPMAC地址

arp -a

 

7.在代理服务器端

捆绑IPMAC地址,解决局域网内盗用IP

ARP s 192.168.10.59 0050ff6c0875

解除网卡的IPMAC地址的绑定:

arp -d 网卡IP

 

8.在网络邻居上隐藏你的计算机

net config server /hidden:yes

net config server /hidden:no 则为开启

 

9.几个net命令

A.显示当前工作组服务器列表 net view,当不带选项使用本命令时,它就会显示当前域或网络上的计算机上的列表。

比如:查看这个IP上的共享资源,就可以

C:\>net view 192.168.10.8

192.168.10.8 的共享资源

资源共享名 类型 用途 注释

--------------------------------------

网站服务 Disk

命令成功完成。

 

B.查看计算机上的用户帐号列表 net user

C.查看网络链接 net use

例如:net use z: \\192.168.10.8\movie 将这个IPmovie共享目录映射为本地的Z

 

D.记录链接 net session

例如:

C:\>net session

计算机 用户名 客户类型 打开空闲时间

-------------------------------------------------------------------------------

\\192.168.10.110 ROME Windows 2000 2195 0 00:03:12

 

\\192.168.10.51 ROME Windows 2000 2195 0 00:00:39

命令成功完成。

 

10.路由跟踪命令

A.tracert pop.pcpop.com

B.pathping pop.pcpop.com 除了显示路由外,还提供325S的分析,计算丢失包的%

 

11.关于共享安全的几个命令

A.查看你机器的共享资源 net share

B.手工删除共享

net share c$ /d

net share d$ /d

net share ipc$ /d

net share admin$ /d

注意$后有空格。

C.增加一个共享:

c:\net share mymovie=e:\downloads\movie /users:1

mymovie 共享成功。

同时限制链接用户数为1人。

 

12.DOS行下设置静态IP

A.设置静态IP

CMD

netsh

netsh>int

interface>ip

interface ip>set add "本地链接" static IP地址 mask gateway

B.查看IP设置

interface ip>show address

 

Arp

显示和修改“地址解析协议 (ARP)”缓存中的项目。ARP 缓存中包含一个或多个表,它们用于存储 IP 地址及其经过解析的以太网或令牌环物理地址。计算机上安装的每一个以太网或令牌环网络适配器都有自己单独的表。如果在没有参数的情况下使用,则 arp 命令将显示帮助信息。

 

语法

arp [-a [InetAddr] [-N IfaceAddr]] [-g [InetAddr] [-N IfaceAddr]] [-d InetAddr [IfaceAddr]] [-s InetAddr EtherAddr [IfaceAddr]]

 

参数

-a [InetAddr] [-N IfaceAddr]

显示所有接口的当前 ARP 缓存表。要显示指定 IP 地址的 ARP 缓存项,请使用带有 InetAddr 参数的 arp -a,此处的 InetAddr 代表指定的 IP 地址。要显示指定接口的 ARP 缓存表,请使用 -N IfaceAddr 参数,此处的 IfaceAddr 代表分配给指定接口的 IP 地址。-N 参数区分大小写。

-g [InetAddr] [-N IfaceAddr]

-a 相同。

-d InetAddr [IfaceAddr]

删除指定的 IP 地址项,此处的 InetAddr 代表 IP 地址。对于指定的接口,要删除表中的某项,请使用 IfaceAddr 参数,此处的 IfaceAddr 代表分配给该接口的 IP 地址。要删除所有项,请使用星号 (*) 通配符代替 InetAddr

-s InetAddr EtherAddr [IfaceAddr]

ARP 缓存添加可将 IP 地址 InetAddr 解析成物理地址 EtherAddr 的静态项。要向指定接口的表添加静态 ARP 缓存项,请使用 IfaceAddr 参数,此处的 IfaceAddr 代表分配给该接口的 IP 地址。

/?

在命令提示符显示帮助。

注释

InetAddr IfaceAddr IP 地址用带圆点的十进制记数法表示。

物理地址 EtherAddr 由六个字节组成,这些字节用十六进制记数法表示并且用连字符隔开(比如,00-AA-00-4F-2A-9C)。

通过 -s 参数添加的项属于静态项,它们不会 ARP 缓存中超时。如果终止 TCP/IP 协议后再启动,这些项会被删除。要创建永久的静态 ARP 缓存项,请在批处理文件中使用适当的 arp 命令并通过“计划任务程序”在启动时运行该批处理文件。

只有当网际协议 (TCP/IP) 协议在 网络连接中安装为网络适配器属性的组件时,该命令才可用。

范例

要显示所有接口的 ARP 缓存表,可键入:

 

arp -a

 

对于指派的 IP 地址为 10.0.0.99 的接口,要显示其 ARP 缓存表,可键入:

 

arp -a -N 10.0.0.99

 

要添加将 IP 地址 10.0.0.80 解析成物理地址 00-AA-00-4F-2A-9C 的静态 ARP 缓存项,可键入:

 

arp -s 10.0.0.80 00-AA-00-4F-2A-9C

 

At

计划在指定时间和日期在计算机上运行命令和程序。at 命令只能在“计划”服务运行时使用。如果在没有参数的情况下使用,则 at 列出已计划的命令。

 

语法

at [\\ComputerName] [{[ID] [/delete]|/delete [/yes]}]

 

at [[\\ComputerName] hours:minutes [/interactive] [{/every:date[,...]|/next:date[,...]}] command]

 

参数

\\computername

指定远程计算机。如果省略该参数,则 at 计划本地计算机上的命令和程序。

ID

指定指派给已计划命令的识别码。

/delete

取消已计划的命令。如果省略了 ID,则计算机中所有已计划的命令将被取消。

/yes

删除已计划的事件时,对来自系统的所有询问都回答“是”。

hours:minutes

指定命令运行的时间。该时间用 24 小时制(即从 00:00 [午夜] 23:59)的 小时: 分钟格式表示。

/interactive

对于在运行 command 时登录的用户,允许 command 与该用户的桌面进行交互。

/every:

在每个星期或月的指定日期(例如,每个星期四,或每月的第三天)运行 command 命令。

date

指定运行命令的日期。可以指定一周的某日或多日(即,键入 MTWThFSSu)或一个月中的某日或多日(即,键入从 1 31 之间的数字)。用逗号分隔多个日期项。如果省略了 date,则 at 使用该月的当前日。

/next:

在下一个指定日期(比如,下一个星期四)到来时运行 command

command

指定要运行的 Windows 命令、程序(.exe .com 文件)或批处理程序(.bat .cmd 文件)。当命令需要路径作为参数时,请使用绝对路径,也就是从驱动器号开始的整个路径。如果命令在远程计算机上,请指定服务器和共享名的通用命名协定 (UNC) 符号,而不是远程驱动器号。

/?

在命令提示符显示帮助。

注释

Schtasks 是功能更为强大的超集命令行计划工具,它含有 at 命令行工具中的所有功能。对于所有的命令行计划任务,都可以使用 schtasks 来替代 at。有关 schtasks 的详细信息,请参阅“相关主题”。

 

使用 at

使用 at 命令时,要求您必须是本地 Administrators 组的成员。

 

加载 Cmd.exe

在运行命令之前,At 不会自动加载 Cmd.exe (命令解释器)。如果没有运行可执行文件 (.exe),则在命令开头必须使用如下所示的方法专门加载 Cmd.exe

 

cmd /c dir > c:\test.out

 

查看已计划的命令

当不带命令行选项使用 at 时,计划任务会出现在类似于以下格式的表中:

 

Status ID Day Time Command Line

OK 1 Each F 4:30 PM net send group leads status due

OK 2 Each M 12:00 AM chkstor > check.file

OK 3 Each F 11:59 PM backup2.bat

包含标识号 (ID)

当在命令提示下使用带有标识号 (ID) at 命令时,单个任务项的信息会显示在类似于下面的格式中:

 

Task ID 1

 

Status:OK

 

Schedule:Each F

 

Time of Day:4:30 PM

 

Command:net send group leads status due当计划带有 at 的命令(尤其是带有命令行选项的命令)后,要通过键入不带命令行选项的 at 来检查该命令语法是否输入正确。如果显示在“命令行”列中的信息不正确,请删除该命令,然后重新键入它。如果还不正确,则可以在重新键入该命令时让它少带些命令行选项。

 

查看结果

使用 at 的已经计划的命令作为后台程序运行。运行结果不会显示在计算机上。要将输出重定向到文件,请使用重定向符号 (>)。如果将输出重定向到文件,则不论是在命令行还是在批处理文件中使用 at,都需要在重定向符号之前使用转义符 (^)。例如,要重定向输出到 Output.text 文件,则要键入:

 

at 14:45 c:\test.bat ^>c:\output.txt

 

执行命令的当前目录为 systemroot 文件夹。

 

更改系统时间

在使用 at 命令计划了要运行的命令之后,如果更改了计算机的系统时间,则通过键入不带命令行选项的 at 可使 at 计划程序与修改后的系统时间同步。

 

存储命令

已计划的命令存储在注册表中。这样,如果重新启动“计划”服务,则不会丢失计划任务。

 

连接到网络驱动器

对于需要访问网络的计划作业,请不要使用已重新定向的驱动器。“计划”服务可能无法访问这些重定向的驱动器,或者,在该计划任务运行时如果有其他用户登录,则这些重定向的驱动器可能不会出现。因此,对于计划作业,请使用 UNC 路径。例如:

 

at 1:00pm my_backup \\server\share

 

请不要使用下述语法(其中 x: ?表示由用户建立的连接):

 

at 1:00pm my_backup x:

 

如果计划了一个使用驱动器号的 at 命令来连接共享目录,则应包含一个 at 命令以使在完成该驱动器的使用时断开与驱动器的连接。如果不能断开与驱动器的连接,则在命令提示下,所指派的驱动器号将不可用。

 

范例

要显示 Marketing 服务器上已计划的命令列表,请键入:

 

at \\marketing

要了解服务器 Corp 上标识号为 3 的命令的详细信息,请键入:

 

at \\corp 3

要计划在上午 8:00 Corp 服务器上运行网络共享命令,并将该列表重定向到 Maintenance 服务器的 Corp.txt 文件(位于 Reports 共享目录下)中,请键入:

 

at \\corp 08:00 cmd /c "net share reports=d:\marketing\reports >> \\maintenance\reports\corp.txt"

为了在每五天后的午夜将 Marketing 服务器的硬盘驱动器备份到磁带驱动器,首先创建名为 Archive.cmd 的批处理程序(它含有备份命令),然后计划该批处理程序的运行,为此请键入:

 

at \\marketing 00:00 /every:5,10,15,20,25,30 archive

要取消当前服务器上已计划的所有命令,请按下述方法清除 at 计划信息:

 

at /delete

如果要运行的命令不是可执行 (.exe) 文件,请按如下所示的方法在该命令之前使用 cmd /c 来加载 Cmd.exe

 

cmd /c dir > c:\test.out

Rsh

在运行 RSH 服务的远程计算机上运行命令。Windows XP Windows 2000 不提供 RSH 服务。Windows 2000 Server Resource Kit 提供名为 Rshsvc.exe RSH 服务。使用不带参数的 rsh 显示帮助。

 

语法

rsh [Host] [-l UserName] [-n] [Command]

 

参数

Host

指定运行 command 的远程计算机。

-l UserName

指定远程计算机上使用的用户名。在省略情况下,使用当前登录用户的名称。

-n

rsh 的输入重定向到 NULL 设备。这防止本地计算机命令结果的显示。

Command

指定要运行的命令。

/?

在命令提示符显示帮助。

注释

标准操作

rsh 命令将标准输入复制到远程 command,将远程 command 的标准输出复制到其标准输出,将远程 command 的标准错误复制到其标准错误。Rsh 通常在远程命令终止时终止。

 

使用重定向符号

为了使重定向在远程计算机上发生,要以引号引住重定向符号(例如 ">>")。如果不使用引号,重定向会在本地计算机发生。例如,以下命令将远程文件“RemoteFile”附加到本地文件“LocalFile”中:

 

rsh othercomputer cat remotefile >> localfile

 

以下命令将远程文件 Remotefile 附加到远程文件 otherremotefile 中:

 

rsh othercomputer cat remotefile ">>" otherremotefile

 

使用 rsh

在使用已登录到某个域并且运行 Windows XP Professional 的计算机时,该域的主域控制器必须可用于确认用户名或 rsh 命令失败。

 

.rhosts 文件

.rhosts 文件通常许可 UNIX 系统的网络访问权限。.rhosts 文件列出可以访问远程计算机的计算机名及关联的登录名。在正确配置了 .rhosts 文件的远程计算机上运行 rcprexec rsh 命令时,您不必提供远程计算机的登录和密码信息。

 

.rhosts 文件是一个文本文件,该文件中每一行为一个条目。条目由本地计算机名、本地用户名和有关该条目的所有注释组成。每个条目均由制表符或空格分开,注释用符号 (#) 打头。例如:

 

host7 #This computer is in room 31A

 

.rhosts 文件必须在远程计算机的用户主目录中。有关远程计算机 .rhosts 文件特定执行的详细信息,请参阅远程系统的文档。

 

只有当网际协议 (TCP/IP) 协议在 网络连接中安装为网络适配器属性的组件时,该命令才可用。

范例

要以名称 admin1 在远程计算机 vax1 上执行 telcon 命令,请键入:

 

rsh vax1 -l admin1 telcon

 

Tftp

向运行平凡文件传输协议 (TFTP) 服务或 daemon 的远程计算机(尤其是运行 UNIX 的计算机)传输文件或从运行平凡文件传输协议 (TFTP) 服务或 daemon 的远程计算机(尤其是运行 UNIX 的计算机)传输文件。

 

语法

tftp [-i] [Host] [{get | put}] [Source] [Destination]

 

参数

-i

指定二进制图像传送模式(也称为八进制模式)。在二进制图像模式下,文件以一个字节为单位进行传输。在传送二进制文件时使用该模式。如果省略了 -i,文件将以 ASCII 模式传送。这是默认的传送模式。该模式将行尾 (EOL) 字符转换为指定计算机的适当格式。传送文本文件时使用该模式。如果文件传送成功,将显示数据传输率。

Host

指定本地或远程计算机。

put

将本地计算机上的 Destination 文件传送到远程计算机上的 Source 文件。因为 TFTP 协议不支持用户身份验证,所以用户必须登录到远程计算机,同时文件在远程计算机上必须可写。

get

将远程计算机上的 Destination 文件传送到本地计算机上的 Source 文件。

Source

指定要传送的文件。

Destination

指定将文件传送到的位置。如果省略了 Destination,将假定它与 Source 同名。

/?

在命令提示符显示帮助。

注释

使用 get 参数

如果将本地计算机上的文件 FileTwo 传送到远程计算机上的文件 FileOne,则指定 put。如果将远程计算机上的文件 FileTwo 传送到远程计算机上的文件 FileOne,则指定 get

 

Windows XP Windows 2000 不提供一般用途的 TFTP 服务器。Windows 2000 提供的 TFTP 服务器服务只为 Windows XP Windows 2000 客户端计算机提供远程引导功能。

只有当网际协议 (TCP/IP) 协议在 网络连接中安装为网络适配器属性的组件时,该命令才可用。

范例

要从本地计算机将文件 Users.txt 传送到远程计算机 vax1 上的 Users19.txt,请键入:

 

tftp vax1 put users.txt users19.txt

Nbtstat

显示本地计算机和远程计算机的基于 TCP/IP (NetBT) 协议的 NetBIOS 统计资料、NetBIOS 名称表和 NetBIOS 名称缓存。Nbtstat 可以刷新 NetBIOS 名称缓存和注册的 Windows Internet 名称服务 (WINS) 名称。使用不带参数的 nbtstat 显示帮助。

 

语法

nbtstat [-a RemoteName] [-A IPAddress] [-c] [-n] [-r] [-R] [-RR] [-s] [-S] [Interval]

 

参数

-a remotename

显示远程计算机的 NetBIOS 名称表,其中,RemoteName 是远程计算机的 NetBIOS 计算机名称。NetBIOS 名称表是运行在该计算机上的应用程序使用的 NetBIOS 名称列表。

-A IPAddress

显示远程计算机的 NetBIOS 名称表,其名称由远程计算机的 IP 地址指定(以小数点分隔)。

-c

显示 NetBIOS 名称缓存内容、NetBIOS 名称表及其解析的各个地址。

-n

显示本地计算机的 NetBIOS 名称表。Registered 中的状态表明该名称是通过广播或 WINS 服务器注册的。

-r

显示 NetBIOS 名称解析统计资料。在配置为使用 WINS Windows XP 计算机上,该参数将返回已通过广播和 WINS 解析和注册的名称号码。

-R

清除 NetBIOS 名称缓存的内容并从 Lmhosts 文件中重新加载带有 #PRE 标记的项目。

-RR

重新释放并刷新通过 WINS 注册的本地计算机的 NetBIOS 名称。

-s

显示 NetBIOS 客户和服务器会话,并试图将目标 IP 地址转化为名称。

-S

显示 NetBIOS 客户和服务器会话,只通过 IP 地址列出远程计算机。

Interval

重新显示选择的统计资料,可以中断每个显示之间的 Interval 中指定的秒数。按 CTRL+C 停止重新显示统计信息。如果省略该参数, netstat 将只显示一次当前的配置信息。

/?

在命令提示符显示帮助。

注释

Nbtstat 命令行参数区分大小写。

下表列出了由 Nbtstat 生成的列标题。 标题 说明

Input 接收的字节数。

Output 发送的字节数。

In/Out 该连接是否从计算机(传出)或者其他计算机到本地计算机(传入)。

Lift 名称表缓存项在被清除之前所存留的时间。

Local Name 本地 NetBIOS 名称与连接相关联。

Remote Host 与远程计算机相关的名称或 IP 地址。

<03> 转化为十六进制的 NetBIOS 名称的最后一个字节。每个 NetBIOS 名称长度均为 16 个字符。由于最后一个字节通常有特殊的意义,因为相同的名称(只有最后一个字节不同)可能在一台计算机上出现几次。例如,<20> ASCII 文本中是一个空格。

Type 名称类型。名称可以是单个名称,也可以是组名称。

Status 远程计算机上是否在运行 NetBIOS 服务(“已注册”),或同一计算机名是否已注册了相同的服务(“冲突”)。

State NetBIOS 连接的状态。

 

下表列出了可能的 NetBIOS 连接状态。 状态 说明

已连接 会话已建立。

关联 连接的终结点已经被创建并与 IP 地址关联。

正接听 该终结点对内向连接可用。

空闲 该结束点已被打开单不能接收连接。

正在连接 会话处于连接阶段。在此阶段正在解析所选目标的由名称到 IP 地址的映射。

接受 入站会话当前正在被接受,将在短期内连接。

重新连接 会话将试图重新连接(如果第一次连接失败)。

出站 会话正处于连接阶段。此阶段正在创建 TCP 连接。

入站 入站会话在连接期。

正在断开 会话正在断开连接。

已中断连接 本地计算机已断开连接,并正等待远程系统的确认。

 

只有当网际协议 (TCP/IP) 协议在 网络连接中安装为网络适配器属性的组件时,该命令才可用。

范例

要显示 NetBIOS 计算机名为 CORP07 的远程计算机的 NetBIOS 名称表,请键入:

 

nbtstat -a CORP07

 

要显示所分配 IP 地址为 10.0.0.99 的远程计算机的 NetBIOS 名称表,请键入:

 

nbtstat -A 10.0.0.99

 

要显示本地计算机的 NetBIOS 名称表,请键入:

 

nbtstat -n

 

要显示本地计算机 NetBIOS 名称缓存的内容,请键入:

 

nbtstat -c

 

要清除 NetBIOS 名称缓存并重新装载本地 Lmhosts 文件中带标记 #PRE 的项目,请键入:

 

nbtstat -R

 

要释放通过 WINS 服务器注册的 NetBIOS 名称并对其重新注册,请键入:

 

nbtstat -RR

 

要每隔 5 秒以 IP 地址显示 NetBIOS 会话统计资料,请键入:

 

nbtstat -S 5

 

Netstat

显示活动的 TCP 连接、计算机侦听的端口、以太网统计信息、IP 路由表、IPv4 统计信息(对于 IPICMPTCP UDP 协议)以及 IPv6 统计信息(对于 IPv6ICMPv6、通过 IPv6 TCP 以及通过 IPv6 UDP 协议)。使用时如果不带参数,netstat 显示活动的 TCP 连接。

 

语法

netstat [-a] [-e] [-n] [-o] [-p Protocol] [-r] [-s] [Interval]

 

参数

-a

显示所有活动的 TCP 连接以及计算机侦听的 TCP UDP 端口。

-e

显示以太网统计信息,如发送和接收的字节数、数据包数。该参数可以与 -s 结合使用。

-n

显示活动的 TCP 连接,不过,只以数字形式表现地址和端口号,却不尝试确定名称。

-o

显示活动的 TCP 连接并包括每个连接的进程 ID (PID)。可以在 Windows 任务管理器中的“进程”选项卡上找到基于 PID 的应用程序。该参数可以与 -a-n -p 结合使用。

-p Protocol

显示 Protocol 所指定的协议的连接。在这种情况下,Protocol 可以是 tcpudptcpv6 udpv6。如果该参数与 -s 一起使用按协议显示统计信息,则 Protocol 可以是 tcpudpicmpiptcpv6udpv6icmpv6 ipv6

-s

按协议显示统计信息。默认情况下,显示 TCPUDPICMP IP 协议的统计信息。如果安装了 Windows XP IPv6 协议,就会显示有关 IPv6 上的 TCPIPv6 上的 UDPICMPv6 IPv6 协议的统计信息。可以使用 -p 参数指定协议集。

-r

显示 IP 路由表的内容。该参数与 route print 命令等价。

Interval

每隔 Interval 秒重新显示一次选定的信息。按 CTRL+C 停止重新显示统计信息。如果省略该参数,netstat 将只打印一次选定的信息。

/?

在命令提示符显示帮助。

注释

与该命令一起使用的参数必须以连字符 (-) 而不是以短斜线 (/) 作为前缀。

Netstat 提供下列统计信息:

Proto

协议的名称(TCP UDP)。

 

Local Address

本地计算机的 IP 地址和正在使用的端口号。如果不指定 -n 参数,就显示与 IP 地址和端口的名称对应的本地计算机名称。如果端口尚未建立,端口以星号(*)显示。

 

Foreign Address

连接该插槽的远程计算机的 IP 地址和端口号码。如果不指定 -n 参数,就显示与 IP 地址和端口对应的名称。如果端口尚未建立,端口以星号(*)显示。

 

(state)

表明 TCP 连接的状态。可能的状态如下:

 

CLOSE_WAIT

 

CLOSED

 

ESTABLISHED

 

FIN_WAIT_1

 

FIN_WAIT_2

 

LAST_ACK

 

LISTEN

 

SYN_RECEIVED

 

SYN_SEND

 

TIMED_WAIT

 

有关 TCP 连接状态的信息,请参阅 RFC 793

 

只有当网际协议 (TCP/IP) 协议在 网络连接中安装为网络适配器属性的组件时,该命令才可用。

范例

要想显示以太网统计信息和所有协议的统计信息,请键入下列命令:

 

netstat -e -s

 

要想仅显示 TCP UDP 协议的统计信息,请键入下列命令:

 

netstat -s -p tcp udp

 

要想每 5 秒钟显示一次活动的 TCP 连接和进程 ID,请键入下列命令:

 

nbtstat -o 5

 

要想以数字形式显示活动的 TCP 连接和进程 ID,请键入下列命令:

 

nbtstat -n o

 

Runas

允许用户用其他权限运行指定的工具和程序,而不是用户当前登录提供的权限。

 

语法

runas [{/profile|/noprofile}] [/env] [/netonly] [/smartcard] [/showtrustlevels] [/trustlevel] /user:UserAccountName program

 

参数

/profile

加载用户的配置文件。/profile 是默认值。

/no profile

/noprofile 指定不加载用户的配置文件。这使应用程序载入的更加快速,但是在一些应用程序中也会引起错误。

/env

指定当前使用的网络环境,而不是用户的本地环境。

/netonly

指明指定的用户信息只用于远程访问。

/smartcard

/smartcard 表示凭据是否是由智能卡提供的。

/showtrustlevels

列出 /trustlevel 开关项。

/trustlevel

指定应用程序运行所在的授权级别。使用 /showtrustlevels 查看可用的信任级别。

/user:UserAccountName

指定在其下运行程序的用户帐户的名称。用户帐户的格式应是 user@domain domain\user

程序

指定要用在 /user 中指定的帐户运行的程序或命令。

/?

在命令提示符显示帮助。

注释

管理员可以使用一个权限受限制的帐户执行日常、非管理性的任务,只有在执行特定管理任务时,才使用一个权限更大的帐户。要不经过注销再重新登录就完成这样的任务,可以用一般帐户登录,然后使用 runas 命令来运行需要更大权限的工具。

有关 runas 命令的使用范例,请参阅“相关主题”。

尽管 runas 通常由 Administrator 帐户使用,但并非仅限于 Administrator 帐户。任何拥有多个帐户的用户均可以利用备用凭据,使用 runas 运行程序、MMC 控制台或“控制面板”项。

如果要在计算机上使用 Administrator 帐户,对于 /user:,键入下列参数之一:

/user:AdministratorAccountName@ComputerName

 

/user:ComputerName\AdministratorAccountName

 

如果想以域管理员身份使用这个命令,键入下列参数之一:

/user:AdministratorAccountName@DomainName

 

/user:DomainName\AdministratorAccountName

 

runas 命令允许您运行程序 (*.exe)、保存的 MMC 控制台 (*.msc)、程序和保存的 MMC 控制台的快捷方式及“控制面板”项。作为另一组(例如“Users”或“Power Users”组)的成员登录到计算机时,可以以管理员的身份运行。

可以使用 runas 命令来启动任何程序、MMC 控制器或“控制面板”项。只要提供适当的用户帐户和密码信息,用户帐户就具有登录到计算机的能力,并且程序、MMC 控制台、“控制面板”项在系统中及对该用户帐户均可用.

runas 命令允许您管理其他域的服务器(运行工具的计算机和要管理的服务器在不同的域中)。

如果尝试使用 runas 从网络位置启动程序、MMC 控制台或“控制面板”项,可能会因为用来连接网络共享的凭据与用来启动程序的凭据不同而失败。后者的凭据可能无法访问同一网络共享。

有些项,例如“打印机”文件夹和桌面项,间接由 Windows 2000 打开,而不能使用 runas 命令启动。

如果 runas 命令失败,则可能是没有运行 RunAs 服务或使用的用户帐户无效。要检查 RunAs 服务的状态,请在“计算机管理”中单击“服务和应用程序”,然后单击“服务”。要测试用户帐户,请尝试使用该帐户登录合适的域。

范例

要在本地计算机上以管理员身份启动 Windows 2000 命令提示行实例,请键入:

 

runas /user:localmachinename\administrator cmd

系统提示时,键入管理员密码。

 

要使用名为 companydomain\domainadmin 的域管理员帐户启动“计算机管理”管理单元实例,请键入:

 

runas /user:companydomain\domainadmin "mmc %windir%\system32\compmgmt.msc"

当提示时,键入帐户密码。

 

要使用名为 domain.microsoft.com 的域中的域管理员帐户 user 启动“记事本”实例,请键入:

 

runas /user:user@domain.microsoft.com "notepad my_file.txt"

当提示时,键入帐户密码。

 

要启动命令提示符行窗口、保存的 MMC 控制台、控制面板项或管理其他地点服务器的程序的一个实例,请键入:

 

runas /netonly /user:domain\username "command"

domain\username 必须是有足够权限管理服务器的用户。当提示时,键入帐户密码。

Route

在本地 IP 路由表中显示和修改条目。使用不带参数的 route 可以显示帮助。

 

语法

route [-f] [-p] [Command [Destination] [mask Netmask] [Gateway] [metric Metric]] [if Interface]]

 

参数

-f

清除所有不是主路由(网掩码为 255.255.255.255 的路由)、环回网络路由(目标为 127.0.0.0,网掩码为 255.255.255.0 的路由)或多播路由(目标为 224.0.0.0,网掩码为 240.0.0.0 的路由)的条目的路由表。如果它与命令之一(例如 addchange delete)结合使用,表会在运行命令之前清除。

-p

add 命令共同使用时,指定路由被添加到注册表并在启动 TCP/IP 协议的时候初始化 IP 路由表。默认情况下,启动 TCP/IP 协议时不会保存添加的路由。与 print 命令一起使用时,则显示永久路由列表。所有其它的命令都忽略此参数。永久路由存储在注册表中的位置是 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\PersistentRoutes

Command

指定要运行的命令。下表列出了有效的命令。 命令 目的

add 添加路由

change 更改现存路由

delete 删除路由

print 打印路由

 

Destination

指定路由的网络目标地址。目标地址可以是一个 IP 网络地址(其中网络地址的主机地址位设置为 0),对于主机路由是 IP 地址,对于默认路由是 0.0.0.0

mask subnetmask

指定与网络目标地址相关联的网掩码(又称之为子网掩码)。子网掩码对于 IP 网络地址可以是一适当的子网掩码,对于主机路由是 255.255.255.255 ,对于默认路由是 0.0.0.0。如果忽略,则使用子网掩码 255.255.255.255。定义路由时由于目标地址和子网掩码之间的关系,目标地址不能比它对应的子网掩码更为详细。换句话说,如果子网掩码的一位是 0,则目标地址中的对应位就不能设置为 1

Gateway

指定超过由网络目标和子网掩码定义的可达到的地址集的前一个或下一个跃点 IP 地址。对于本地连接的子网路由,网关地址是分配给连接子网接口的 IP 地址。对于要经过一个或多个路由器才可用到的远程路由,网关地址是一个分配给相邻路由器的、可直接达到的 IP 地址。

metric Metric

为路由指定所需跃点数的整数值(范围是 1 ~ 9999),它用来在路由表里的多个路由中选择与转发包中的目标地址最为匹配的路由。所选的路由具有最少的跃点数。跃点数能够反映跃点的数量、路径的速度、路径可靠性、路径吞吐量以及管理属性。

if Interface

指定目标可以到达的接口的接口索引。使用 route print 命令可以显示接口及其对应接口索引的列表。对于接口索引可以使用十进制或十六进制的值。对于十六进制值,要在十六进制数的前面加上 0x。忽略 if 参数时,接口由网关地址确定。

/?

在命令提示符显示帮助。

注释

路由表中 跃点数 一列的值较大是由于允许 TCP/IP 根据每个 LAN 接口的 IP 地址、子网掩码和默认网关的配置自动确定路由表中路由的跃点数造成的。默认启动的自动确定接口跃点数确定了每个接口的速度,调整了每个接口的路由跃点数,因此最快接口所创建的路由具有最低的跃点数。要删除大跃点数,请在每个 LAN 连接的 TCP/IP 协议的高级属性中禁用自动确定接口跃点数。

如果在 systemroot\System32\Drivers\Etc 文件夹的本地网络文件中存在适当的条目,名称可以用于 Destination。只要名称可以通过“域名系统” (DNS) 查询这样的标准主机名解析技术分解为 IP 地址,就可以将其用于 GatewayDNS 查询使用存储在 systemroot\System32\Drivers\Etc 文件夹下的本地主机文件和 NetBIOS 名称解析。

如果是 print delete 命令,可以忽略 Gateway 参数,使用通配符来表示目标和网关。Destination 的值可以是由星号 (*) 指定的通配符。如果指定目标含有一个星号 (*) 或问号 (?),它被看作是通配符,只打印或删除匹配的目标路由。星号代表任意一字符序列,问号代表任一字符。例如, 10.*.1, 192.168.* 127.* *224* 都是星号通配符的有效使用。

使用了无效的目标和子网掩码(网掩码)值的组合,会显示“Route:bad gateway address netmask”错误消息。目标中有一位或多位设置为 1,而其在子网掩码中的对应位设置为 0 时会发生这个错误。可以通过二进制表示法表示目标和子网掩码来检查这种情况。以二进制表示的子网掩码包括表示目标网络地址部分的一连串的 1 和表示目标主机地址部分的一连串的 0 两个部分。查看目标以确定目标的主机地址部分(由子网掩码所定义)是否有些位设置成了 1

只有 Windows NT 4.0Windows 2000Windows Millennium Edition Windows XP route 命令支持 -p 参数。Windows 95 Windows 98 route 命令不支持该参数。

只有当网际协议 (TCP/IP) 协议在 网络连接中安装为网络适配器属性的组件时,该命令才可用。

范例

要显示 IP 路由表的完整内容,请键入:

 

route print

 

要显示 IP 路由表中以 10. 开始的路由,请键入:

 

route print 10.*

 

要添加默认网关地址为 192.168.12.1 的默认路由,请键入:

 

route add 0.0.0.0 mask 0.0.0.0 192.168.12.1

 

要添加目标为 10.41.0.0,子网掩码为 255.255.0.0,下一个跃点地址为 10.27.0.1 的路由,请键入:

 

route add 10.41.0.0 mask 255.255.0.0 10.27.0.1

 

要添加目标为 10.41.0.0,子网掩码为 255.255.0.0,下一个跃点地址为 10.27.0.1 的永久路由,请键入:

 

route -p add 10.41.0.0 mask 255.255.0.0 10.27.0.1

 

要添加目标为 10.41.0.0,子网掩码为 255.255.0.0,下一个跃点地址为 10.27.0.1,跃点数为 7 的路由,请键入:

 

route add 10.41.0.0 mask 255.255.0.0 10.27.0.1 metric 7

 

要添加目标为 10.41.0.0,子网掩码为 255.255.0.0,下一个跃点地址为 10.27.0.1,接口索引为 0x3 的路由,请键入:

 

route add 10.41.0.0 mask 255.255.0.0 10.27.0.1 if 0x3

 

要删除目标为 10.41.0.0,子网掩码为 255.255.0.0 的路由,请键入:

 

route delete 10.41.0.0 mask 255.255.0.0

 

要删除 IP 路由表中以 10. 开始的所有路由,请键入:

 

route delete 10.*

 

要将目标为 10.41.0.0,子网掩码为 255.255.0.0 的路由的下一个跃点地址由 10.27.0.1 更改为 10.27.0.25,请键入:

 

route change 10.41.0.0 mask 255.255.0.0 10.27.0.25

 

怎样在windowsservercmd下更改ip地址■■■ -> Windows 2k/2003 Server

在命令行下更改ip地址

 

Windows2000是现在比较流行的操作系统,它的功能是很强大的,它甚至可以象Unix一样在命令行下做很多的工作。下面一种在命令行下更改ip地址的方法,现介绍给大家(括号里是一些注释,黑体字是人工录入的):

 

C:\>ipconfig (首先用ipconfig这个命令看一下更改之前的ip地址)

 

Windows 2000 IP Configuration

 

Ethernet adapter 本地连接:

 

Connection-specific DNS Suffix . :

 

IP Address. . . . . . . . . . . . : 10.1.1.94 (本地连接更改之前的ip

 

Subnet Mask . . . . . . . . . . . : 255.255.255.0

 

Default Gateway . . . . . . . . . : 10.1.1.254

 

C:\>netsh (进入设置模式)

 

netsh>interface

 

interface>ip

 

interface ip>set address "本地连接" static 10.1.1.111 255.255.255.0 10.1.1.254

 

interface ip>exit

 

 

上文中的set命令具体解释如下:

 

set address - 设置指定的接口的 IP 地址和默认网关。

 

set dns - 设置 DNS 服务器模式和地址。

 

set wins - 设置 WINS 服务器模式和地址。

 

 

C:\>ipconfig (更改后再用ipconfig命令看一下,确认一下是否更改成功)

 

Windows 2000 IP Configuration

 

Ethernet adapter 本地连接:

 

Connection-specific DNS Suffix . :

 

IP Address. . . . . . . . . . . . : 10.1.1.111

 

Subnet Mask . . . . . . . . . . . : 255.255.255.0

 

Default Gateway . . . . . . . . . : 10.1.1.254

 

 

命令一览

.. - 移到上一层上下文级。

? - 显示命令列表。

aaaa - 更改到 `aaaa' 上下文。

abort - 丢弃在脱机模式下所做的更改。

add - 将一个配置项添加到项目列表中。

alias - 添加一个别名

bye - 退出程序。

commit - 提交在脱机模式中所做的更改。

delete - 在项目列表上删除一个配置项目。

dhcp - 更改到 `dhcp' 上下文。

dump - 显示一个配置脚本。

exec - 运行一个脚本文件。

exit - 退出程序。

help - 显示命令列表。

interface - 更改到 `interface' 上下文。

offline - 将当前模式设置成脱机。

online - 将当前模式设置成联机。

popd - 从堆栈上打开一个上下文。

pushd - 将当前上下文放推入堆栈。

quit - 退出程序。

ras - 更改到 `ras' 上下文。

routing - 更改到 `routing' 上下文。

set - 更新配置设置。

show - 显示信息

unalias - 删除一个别名。

wins - 更改到 `wins' 上下文。

快速切换IP地址有绝招

 

在工作过程中会遇到在不同的网段中进行网络调试的情况,经常需要将机器在几个不同的IP地址中进行切换。在Win2000操作系统中改变IP地址较之Win98已经方便多了因为改完IP地址后不需要重启计算机,但还要进入网络属性设置中进行操作。有没有再简便一点的方法呢,比如用鼠标双击一下快捷方式就可以实现IP地址的切换?

 

答案是肯定的。在Win2000中用netsh命令就可以实现这个功能。首先进入命令行模式(在“开始→运行”中键入“cmd”即可进入命令行模式),在提示符下键入netsh即可进入netsh的界面。再键入int ip进入接口IP的配置模式,键入dump则列出接口IP配置信息:

 

C:\Documents and Settings\Administrator>netsh

netsh>

netsh>int ip

interface ip>dump

# ----------------------------------

# 接口 IP 配置

# ----------------------------------

pushd interface ip

# ″本地连接″ 的接口IP 配置(注:以下显示视具体机器情况而定)

set address name = ″本地连接″ source = static addr = 192.168.0.5 mask = 255.255.255.0

set address name = ″本地连接″ gateway = 192.168.0.2 gwmetric = 1

set dns name = ″本地连接″ source = static addr = 61.237.17.181

add dns name = ″本地连接″ addr = 211.97.168.129

add dns name = ″本地连接″ addr = 211.98.4.1

set wins name = ″本地连接″ source = static addr = none

# ″本地连接 2 的接口 IP 配置

set address name = ″本地连接 2 source = dhcp

set dns name = ″本地连接 2 source = dhcp

set wins name = ″本地连接 2 source = dhcp

popd

# 接口 IP 配置结束

 

快速切换IP地址有绝招 2

 

 

现在我们可以大致了解到用netsh命令更改IP地址的方式,即通过“set address name =连接名称(连接名称要用引号括起来)source=static addr=IP地址 mask=子网掩码”来实现。

 

到命令行模式下用netsh直接试一下。比如要将本机的IP地址改为192.168.0.7,子网掩码为255.255.255.0,可以进行以下操作:

 

C:\Documents and Settings\Administrator>netsh

netsh>int ip

interface ip>set address name ="本地连接"source = static addr = 192.168.0.7 mask = 255.255.255.0

确认更改。

interface ip>exit

再用ipconfig命令核实一下:

C:\Documents and Settings\Administrator>ipconfig

Windows 2000 IP Configuration

Ethernet adapter 本地连接 2

Media State . . . . . . . . . . . Cable Disconnected

Ethernet adapter 本地连接

Connection-specific DNS Suffix .

IP Address. . . . . . . . . . . . 192.168.0.7

Subnet Mask . . . . . . . . . . . 255.255.255.0

Default Gateway . . . . . . . . . 192.168.0.2

 

从以上显示中可以看到已经成功实现了在Win2000中用命令行方式来改变IP地址。用这种方式改变IP地址甚至还没有在图形界面中操作来得快。不过我们再用脚本帮一下忙,离胜利目标就不远了。首先打开记事本,输入以下内容:

 

int ip

set address name=″本地连接″ source=static addr=192.168.0.7 mask=255.255.255.0

 

然后保存为一个名为“7.sh”的文件,放到C盘根目录下,再进入命令行模式,在C盘根目录下键入“netsh exec 7.sh”,好像没什么反应啊?不过再用ipconfig查看一下,会发现IP地址已经改过来了。

 

最后再用记事本写一个批处理文件,命名为“7.bat”,内容为“netsh exec 7.sh”。为该文件在桌面上创建一个快捷方式,这样双击该快捷方式即可实现IP地址的快速改变。如果要快速在192.168.0.5192.168.0.7等相同网段IP地址间进行切换的话,只需要改变“addr”后面的地址即可,但是要将IP地址改为如172.19.96.7之类不同网段的IP地址,就需要将网关信息一起改变,也就是在脚本文件中加入一行关于网关的信息:

 

int ip

set address name = ″本地连接″source = static addr= 172.19.96.7 mask = 255.255.255.0

set address name = ″本地连接″gateway = 172.19.96.1 gwmetric = 1

 

同样地将以上内容存为脚本文件,再做成批处理文件执行一下,用ipconfig/all命令检测一下,发现包括网关在内的信息也修改过来了。这是不是既快又方便,IP地址想换就换?

使用 netstat 显示连接统计

可以使用 netstat 命令显示协议统计信息和当前的 TCP/IP 连接。netstat -a 命令将显示所有连接,而 netstat -r 显示路由表和活动连接。netstat -e 命令将显示 Ethernet 统计信息,而 netstat -s 显示每个协议的统计信息。如果使用 netstat -n,则不能将地址和端口号转换成名称。

Tracert(跟踪路由)是路由跟踪实用程序,用于确定 IP 数据报访问目标所采取的路径。Tracert 命令用 IP 生存时间 (TTL) 字段和 ICMP 错误消息来确定从一个主机到网络上其他主机的路由。

-d 指定不将IP 地址解析到主机名称。

-h maximum_hops 指定跃点数以跟踪到称为 target_name 的主机的路由。

-j host-list 指定 Tracert 实用程序数据包所采用路径中的路由器接口列表。

-w timeout 等待 timeout 为每次回复所指定的毫秒数。

target_name 目标主机的名称或 IP 地址。

pathping 命令是一个路由跟踪工具,它将 ping tracert 命令的功能和这两个工具所不提供的其他信息结合起来。pathping 命令在一段时间内将数据包发送到到达最终目标的路径上的每个路由器,然后基于数据包的计算机结果从每个跃点返回。由于命令显示数据包在任何给定路由器或链接上丢失的程度,因此可以很容易地确定可能导致网络问题的路由器或链接。

-n Hostnames 不将地址解析成主机名。

-h Maximum hops 搜索目标的最大跃点数。

-g Host-list 沿着路由列表释放源路由。

-p Period ping 之间等待的毫秒数。

-q Num_queries 每个跃点的查询数。

-w Time-out 为每次回复所等待的毫秒数。

-T Layer 2 tag 将第 2 层优先级标记(例如,对于 IEEE 802.1p)连接到数据包并将它发送到路径中的每个网络设备。这有助于标识没有正确配置第 2 层优先级的网络设备。-T 开关用于测试服务质量 (QoS) 连通性。

-R RSVP test Che 检查以确定路径中的每个路由器是否支持“资源保留协议 (RSVP)”,此协议允许主机为数据流保留一定量的带宽。 -R 开关用于测试服务质量 (QoS) 连通性。

在命令提示符下交互使用 DHCP 命令

打开 命令提示符。

键入 netsh

netsh>(Netshell) 命令提示行键入“dhcp”。

dhcp>DHCP 辅助程序)命令提示行,为您要管理的服务器键入 server \\servername server ip_address

一旦您有权管理的服务器已成功连接,则会看到“您可以对服务器 servername 进行读写访问”

一旦连接成功,您就可以使用用于 DHCP 的任何支持的 Netshell 命令。 键入 /? help 来显示直接的 DHCP 子命令菜单或作为选项显示,键入 list 列出可与 DHCP 一起使用的所有 Netshell 子命令。

route 的命令

routing ip add/delete/set/show interface 在指定接口上添加、删除、配置或显示常规 IP 路由设置。

routing ip add/delete/set/show filter 在指定接口上添加、删除、配置或显示 IP 数据包筛选器。

routing ip add/delete/show boundary 在指定接口上添加、删除或显示多播边界设置。

routing ip add/set ipiptunnel 添加或配置 IP 中的 IP 接口。

routing ip add/delete/set/show rtmroute 添加、配置或显示不持续的路由表管理器路由。

routing ip add/delete/set/show persistentroute 添加、删除、配置或显示持续路由。

routing ip add/delete/set/show preferenceforprotocol 添加、删除、配置或显示路由协议的优先级。

routing ip add/delete/set/show scope 添加、删除或显示多播作用域。

routing ip set/show loglevel 配置或显示全局 IP 记录等级。

routing ip show helper 显示 IP 的所有 Netsh 实用程序子环境。

routing ip show protocol 显示所有正在运行的 IP 路由协议。

routing ip show mfe 显示多播转发项。

routing ip show mfestats 显示多播转发项统计。

routing ip show boundarystats 显示 IP 多播边界。

routing ip show rtmdestinations 显示路由表管理器路由表中的目标。

routing ip show rtmroutes 显示路由表管理器路由表中的路由。

routing ip nat set/show global 配置或显示全局网络地址转换 (NAT) 设置。

routing ip nat add/delete/set/show interface 添加、删除、配置或显示指定接口的 NAT 设置。

routing ip nat add/delete addressrange NAT 接口公用地址池中添加或删除一个地址范围。

routing ip nat add/delete addressmapping 添加或删除 NAT 地址映射。

routing ip nat add/delete portmapping 添加或删除 NAT 端口映射。

routing ip autodhcp set/show global 配置或显示全局 DHCP 分配器参数。

routing ip autodhcp set/show interface 配置或显示指定接口的 DHCP 分配器设置。

routing ip autodhcp add/delete exclusion DHCP 分配器地址范围中添加或删除一个排除范围。

routing ip dnsproxy set/show global 配置或显示全局 DNS 代理参数。

routing ip dnsproxy set/show interface 配置或显示指定接口的 DNS 代理参数。

routing ip igmp set/show global 配置或显示 IGMP 全局设置。

routing ip igmp add/delete/set/show interface 在指定接口上添加、删除、配置或显示 IGMP

routing ip igmp add/delete staticgroup 添加或删除指定接口的静态多播组。

routing ip igmp show grouptable 显示 IGMP 主机组表。

routing ip igmp show ifstats 显示每个接口的 IGMP 统计。

routing ip igmp show iftable 显示每个接口的 IGMP 主机组。

routing ip igmp show proxygrouptable 显示 IGMP 代理接口的 IGMP 组表。

routing ip igmp show rasgrouptable 显示远程访问服务器所使用的 Internet 接口的组表。

routing ip ospf set/show global 配置或显示全局 OSPF 设置。

routing ip ospf add/delete/set/show interface 在指定接口上添加、删除、配置或显示 OSPF

routing ip ospf add/delete/set/show area 添加、删除、配置或显示 OSPF 区域。

routing ip ospf add/delete/show range 在指定的 OSPF 区域上添加、删除、配置或显示范围。

routing ip ospf add/delete/set/show virtif 添加、删除、配置或显示 OSPF 虚拟接口。

routing ip ospf add/delete/show neighbor 添加、删除、配置或显示 OSPF 邻居。

routing ip ospf add/delete/show protofilter 添加、删除、配置或显示 OSPF 外部路由的路由信息源。

routing ip ospf add/delete/show routefilter 添加、删除、配置或显示 OSPF 外部路由的路由筛选。

routing ip ospf show areastats 显示 OSPF 区域统计。

routing ip ospf show lsdb 显示 OSPF 链接状态数据库。

routing ip ospf show virtifstats 显示 OSPF 虚拟链接统计。

routing ip relay set global 配置“DHCP 中继代理程序”的全局设置。

routing ip relay add/delete/set interface 在指定接口上添加、删除或配置“DHCP 中继代理程序”设置。

routing ip relay add/delete dhcpserver DHCP 服务器地址列表中添加或删除 DHCP 服务器的 IP 地址。

routing ip relay show ifbinding 显示接口的 IP 地址绑定。

routing ip relay show ifconfig 显示每个接口的“DHCP 中继代理程序”配置。

routing ip relay show ifstats 显示每个接口的 DHCP 统计。

routing ip rip set/show global 配置 IP RIP 全局设置。

routing ip rip add/delete/set/show interface 在指定接口上添加或配置 IP RIP 设置。

routing ip rip add/delete peerfilter 添加或删除 RIP 对等筛选器。

routing ip rip add/delete acceptfilter 在接受的路由列表中添加或删除 RIP 路由筛选器。

routing ip rip add/delete announcefilter 在公布的路由列表中添加或删除 RIP 路由筛选器。

routing ip rip add/delete/show neighbor 添加或删除 RIP 邻居。

routing ip rip set/show flags 在指定接口上配置 IP RIP 高级设置。

routing ip rip show globalstats 显示全局 RIP 参数。

routing ip rip show ifbinding 显示接口的 IP 地址绑定。

routing ip rip show ifstats 显示每个接口的 RIP 统计。

IPX netsh 路由命令

routing ipx add/set staticroute IPX 路由表中添加或配置静态 IPX 路由。

routing ipx add/set staticservice SAP 服务表中添加或配置静态 SAP 服务。

routing ipx add/set filter 在指定的接口上添加或配置 IPX 数据包筛选器。

routing ipx add/set interface 在请求拨号接口上启用 IPX 路由,或在指定的接口上配置 IPX 设置。

routing ipx set global 配置全局 IPX 路由设置。

routing ipx rip add/set filter 添加和配置 RIP 路由筛选器。

routing ipx rip set global 配置全局 IPX RIP 设置。

routing ipx rip set interface 在指定接口上配置 IPX RIP 设置。

routing ipx sap add/set filter 添加或配置 SAP 服务筛选器。

routing ipx sap set global 配置全局 IPX SAP 设置。

routing ipx sap set interface 在指定接口上配置 IPX SAP 设置。

routing ipx netbios add nbname 将静态 NETBIOS 名称添加到 IPX NetBIOS 名称表中。

routing ipx netbios set interface 在指定接口上配置基于 IPX NetBIOS 设置。

WINS NetSh 命令

list 列出所有可用的 WINS 命令。

dump WINS 服务器配置转储到命令输出。

add name 在服务器上注册名称。详细信息,请输入 add name /?

add partner 向服务器添加复制伙伴。详细信息,请输入 add partner /?

add pngserver 添加当前服务器的 Persona Non Grata 服务器列表。详细信息,请输入 add pngserver /?

check database 检查数据库的一致性。详细信息,请输入 check database /?

check name 检查一组 WINS 服务器的名称记录列表。详细信息,请输入 check name /?

check version 检查版本号的一致性。详细信息,请输入 check version /?

delete name 从服务器数据库中删除已注册的名称。详细信息,请输入 delete name /?

delete partner 从复制伙伴列表中删除复制伙伴。详细信息,请输入 delete partner /?

delete records 从服务器删除或逻辑删除所有记录或一组记录。详细信息,请输入 delete records /?

delete owners 删除所有者列表及其记录。详细信息,请输入 delete owners /?

delete pngserver 从列表中删除所有的或选定的 Persona Non Grata 服务器。详细信息,请输入 delete pngserver /?

init backup 备份 WINS 数据库。详细信息,请输入 init backup /?

init import Lmhosts 文件导入数据。详细信息,请输入 init import /?

init pull 启动“拉”触发器,并发送给另一台 WINS 服务器。详细信息,请输入 init pull /?

init pullrange 开始另一台 WINS 服务器的一组记录,并读取该记录。详细信息,请输入 init pullrange /?

init push 启动“推”触发器,并发送给另一台 WINS 服务器。详细信息,请输入 init push /?

init replicate 用复制伙伴复制数据库。详细信息,请输入 init replicate /?

init restore 从文件还原数据库。详细信息,请输入 init restore /?

init scavenge 清除服务器的 WINS 数据库。详细信息,请输入 init scavenge /?

init search 搜索服务器的 WINS 数据库。详细信息,请输入 init search /?

reset statistics 重置服务器的统计信息。详细信息,请输入 reset statistics /?

set autopartnerconfig 设置服务器的自动复制伙伴配置信息。详细信息,请输入 set autopartnerconfig /?

set backuppath 设置服务器的备份参数。详细信息,请输入 set backuppath /?

set burstparam 设置服务器的突发处理参数。详细信息,请输入 set autopartnerconfig /?

set logparam 设置数据库和事件日志记录选项。详细信息,请输入 set logparam /?

set migrateflag 设置服务器的迁移标志。详细信息,请输入 set migrateflag /?

set namerecord 设置服务器的间隔和超时值。详细信息,请输入 set namerecord /?

set periodicdbchecking 设置服务器的定期数据库检查参数。详细信息,请输入 set periodicdbchecking /?

set pullpartnerconfig 设置指定的“拉”伙伴的配置参数。详细信息,请输入 set pullpartnerconfig /?

set pushpartnerconfig 设置指定的“推”伙伴的配置参数。详细信息,请输入 set pushpartnerconfig /?

set pullparam 设置服务器的默认“拉”参数。详细信息,请输入 set pullparam /?

set pushparam 设置服务器的默认“推”参数。详细信息,请输入 set pushparam /?

set replicateflag 设置服务器的复制标志。详细信息,请输入 set replicateflag /?

set startversion 设置数据库的开始版本 ID。详细信息,请输入 set startversion /?

show browser 显示所有活动域主浏览器的 [1Bh] 记录。详细信息,请输入 show browser /?

show database 显示指定服务器的数据库和记录。详细信息,请输入 show database /?

show info 显示配置信息。详细信息,请输入 show info /?

show name 显示服务器中特定记录的详细信息。详细信息,请输入 show name /?

show partner 显示服务器的“拉”或“推”(或“推拉”)伙伴。详细信息,请输入 show partner /?

show partnerproperties 显示默认伙伴配置。详细信息,请输入 show partnerproperties /?

show pullpartnerconfig 显示“拉”伙伴的配置信息。详细信息,请输入 show pullpartnerconfig /?

show pushpartnerconfig 显示“推”伙伴的配置信息。详细信息,请输入 show pushpartnerconfig /?

show reccount 显示指定服务器所拥有的记录数量。详细信息,请输入 show reccount /?

show recbyversion 显示指定服务器所拥有的记录。详细信息,请输入 show recbyversion /?

show server 显示当前选定的服务器。详细信息,请输入 show server /?

show statistics 显示 WINS 服务器的统计信息。详细信息,请输入 show statistics /?

show version 显示 WINS 服务器的当前版本计数器值。详细信息,请输入 show version /?

show versionmap 显示所有者 ID 到“最大版本数”的映射。详细信息,请输入 show versionmap /?

Interface 命令

interface set/show interface 启用、禁用、连接、断开连接以及显示请求拨号接口的配置。

interface set/show credentials 在请求拨号接口上配置或显示用户名、密码和域名。

Win2000命令全集

 

accwiz.exe > Accessibility Wizard for walking you through setting up your machine for your mobility needs. 辅助工具向导

 

acsetups.exe > ACS setup DCOM server executable

 

actmovie.exe > Direct Show setup tool 直接显示安装工具

 

append.exe > Allows programs to open data in specified directories as if they were in the current directory. 允许程序打开制定目录中的数据

 

arp.exe > NETWORK Display and modify IP - Hardware addresses 显示和更改计算机的IP与硬件物理地址的对应列表

 

at.exe > AT is a scheduling utility also included with UNIX 计划运行任务

 

atmadm.exe > Displays statistics for ATM call manager. ATM调用管理器统计

 

attrib.exe > Display and modify attributes for files and folders 显示和更改文件和文件夹属性

 

autochk.exe > Used to check and repair Windows File Systems 检测修复文件系统

 

autoconv.exe > Automates the file system conversion during reboots 在启动过程中自动转化系统

 

autofmt.exe > Automates the file format process during reboots 在启动过程中格式化进程

 

autolfn.exe > Used for formatting long file names 使用长文件名格式

 

bootok.exe > Boot acceptance application for registry

 

bootvrfy.exe > Bootvrfy.exe, a program included in Windows 2000 that notifies the system that startup was successful. Bootvrfy.exe can be run on a local or remote computer. 通报启动成功

cacls.exe > Displays or modifies access control lists (ACLs) of files. 显示和编辑ACL

 

calc.exe > Windows Calculators 计算器

 

cdplayer.exe > Windows CD Player CD播放器

 

change.exe > Change { User | Port | Logon } 与终端服务器相关的查询

 

charmap.exe > Character Map 字符映射表

 

chglogon.exe > Same as using "Change Logon" 启动或停用会话记录

 

chgport.exe > Same as using "Change Port" 改变端口(终端服务)

 

chgusr.exe > Same as using "Change User" 改变用户(终端服务)

 

chkdsk.exe > Check the hard disk for errors similar to Scandisk 3 Stages must specify a Drive Letter 磁盘检测程序

 

chkntfs.exe > Same as using chkdsk but for NTFS NTFS磁盘检测程序

 

cidaemon.exe > Component of Ci Filer Service 组成Ci文档服务

 

cipher.exe > Displays or alters the encryption of directories [files] on NTFS partitions. NTFS上显示或改变加密的文件或目录

 

cisvc.exe > Content Index -- It's the content indexing service for I 索引内容

 

ckcnv.exe > Cookie Convertor 变换Cookie

 

cleanmgr.exe > Disk Cleanup, popular with Windows 98 磁盘清理

 

cliconfg.exe > SQL Server Client Network Utility SQL客户网络工具

 

clipbrd.exe > Clipboard viewer for Local will allow you to connect to other clipboards 剪贴簿查看器

 

clipsrv.exe > Start the clipboard Server 运行Clipboard服务

 

clspack.exe > CLSPACK used to create a file listing of system packages 建立系统文件列表清单

 

cluster.exe > Display a cluster in a domain 显示域的集群

 

_cmd_.exe > Famous command prompt 没什么好说的!

 

cmdl32.exe > Connection Manager Auto-Download 自动下载连接管理

 

cmmgr32.exe > Connection Manager 连接管理器

 

cmmon32.exe > Connection Manager Monitor 连接管理器监视

 

cmstp.exe > Connection Manager Profile Manager 连接管理器配置文件安装程序

 

comclust.exe > about cluster server 集群

 

comp.exe > ComClust Add, Remove, or Join a cluster. 比较两个文件和文件集的内容*

 

compact.exe > Displays or alters the compression of files on NTFS partitions. 显示或改变NTFS分区上文件的压缩状态

 

conime.exe > Console IME IME控制台

 

control.exe > Starts the control panel 控制面板

 

convert.exe > Convert File System to NTFS 转换文件系统到NTFS

 

convlog.exe > Converts MS IIS log files 转换IIS日志文件格式到NCSA格式

 

cprofile.exe > Copy profiles 转换显示模式

 

cscript.exe > MS Windows Scripts Host Version 5.1 较本宿主版本

 

csrss.exe > Client Server Runtime Process 客户服务器Runtime进程

 

csvde.exe > Comma Separated Variable Import/Export Utility 日至格式转换程序

 

dbgtrace.exe > Terminal Server相关

 

dcomcnfg.exe > Display the current DCOM configuration. DCOM配置属性

 

dcphelp.exe > ?

 

dcpromo.exe > Promote a domain controller to ADSI AD安装向导

 

ddeshare.exe > Display DDE shares on local or remote computer DDE共享

 

ddmprxy.exe >

 

debug.exe > Runs Debug, a program testing and editing tool. 就是DEBUG啦!

 

dfrgfat.exe > Defrag FAT file system FAT分区磁盘碎片整理程序

 

dfrgntfs.exe > Defrag NTFS file system NTFS分区磁盘碎片整理程序

 

dfs_cmd_.exe > configures a Dfs tree 配置一个DFS

 

dfsinit.exe > Distributed File System Initialization 分布式文件系统初始化

 

dfssvc.exe > Distributed File System Server 分布式文件系统服务器

 

diantz.exe > MS Cabinet Maker 制作CAB文件

 

diskperf.exe > Starts physical Disk Performance counters 磁盘性能计数器

 

dllhost.exe > dllhost is used on all versions of Windows 2000. dllhost is the hedost process for all COM+ applications. 所有COM+应用软件的主进程

 

dllhst3g.exe >

 

dmadmin.exe > Disk Manager Service 磁盘管理服务

 

dmremote.exe > Part of disk management 磁盘管理服务的一部分

 

dns.exe > DNS Applications DNS

 

doskey.exe > recalls Windows command lines and creates macros 命令行创建宏

 

dosx.exe > DOS Extender DOS扩展

 

dplaysvr.exe > Direct Play Helper 直接运行帮助

 

drwatson.exe > Dr Watson for 2000 Fault Detector 华生医生错误检测

 

drwtsn32.exe > Dr Watson for 2000 viewer and configuration manager 华生医生显示和配置管理

 

dtcsetup.exe > Installs MDTC

 

dvdplay.exe > Windows 2000 DVD player DVD播放

 

dxdiag.exe > Direct-X Diagnostics Direct-X诊断工具

 

edlin.exe > line-oriented text editor. 命令行的文本编辑器(历史悠久啊!)

edlin.exe > line-oriented text editor. 命令行的文本编辑器(历史悠久啊!)

 

esentutl.exe > MS Database Utility MS数据库工具

 

eudcedit.exe > Private character editor Ture Type造字程序

 

eventvwr.exe > Windows 2000 Event Viewer 事件查看器

 

evnt_cmd_.exe > Event to trap translator; Configuration tool

 

evntwin.exe > Event to trap translator setup

 

exe2bin.exe > Converts EXE to binary format 转换EXE文件到二进制

 

expand.exe > Expand Files that have been compressed 解压缩

 

extrac32.exe > CAB File extraction utility CAB工具

 

fastopen.exe > Fastopen tracks the location of files on a hard disk and stores the information in memory for fast access. 快速访问在内存中的硬盘文件

 

faxcover.exe > Fax Cover page editor 传真封面编辑

 

faxqueue.exe > Display Fax Queue 显示传真队列

 

faxsend.exe > Fax Wizard for sending faxes 发送传真向导

 

faxsvc.exe > Starts fax server 启动传真服务

 

fc.exe > Compares two files or sets of files and their differences 比较两个文件的不同

 

find.exe > Searches for a text string in file or files 查找文件中的文本行

 

findstr.exe > Searches for strings in files 查找文件中的行

 

finger.exe > Fingers a user and displays statistics on that user Finger一个用户并显示出统计结果

 

fixmapi.exe > Fix mapi files 修复MAPI文件

 

flattemp.exe > Enable or disable temporally directories 允许或者禁用临时文件目录

 

fontview.exe > Display fonts in a font file 显示字体文件中的字体

 

forcedos.exe > Forces a file to start in dos mode. 强制文件在DOS模式下运行

 

freecell.exe > Popular Windows Game 空当接龙

 

ftp.exe > File Transfer Protocol used to transfer files over a network connection 就是FTP

 

gdi.exe > Graphic Device Interface 图形界面驱动

 

grovel.exe >

 

grpconv.exe > Program Manager Group Convertor 转换程序管理员组

 

help.exe > displays help for Windows 2000 commands 显示帮助

 

hostname.exe > Display hostname for machine. 显示机器的Hostname

 

ie4uinit.exe > IE5 User Install tool IE5用户安装工具

 

ieshwiz.exe > Customize folder wizard 自定义文件夹向导

 

iexpress.exe > Create and setup packages for install 穿件安装包

 

iisreset.exe > Restart IIS Admin Service 重启IIS服务

 

internat.exe > Keyboard Language Indicator Applet 键盘语言指示器

 

ipconfig.exe > Windows 2000 IP configuration. 察看IP配置

 

ipsecmon.exe > IP Security Monitor IP安全监视器

 

ipxroute.exe > IPX Routing and Source Routing Control Program IPX路由和源路由控制程序

 

irftp.exe > Setup FTP for wireless communication 无线连接

 

ismserv.exe > Intersite messaging Service 安装或者删除Service Control Manager中的服务

 

jdbgmgr.exe > Microsoft debugger for java 4 Java4的调试器

 

jetconv.exe > Convert a Jet Engine Database 转换Jet Engine数据库

 

jetpack.exe > Compact Jet Database. 压缩Jet数据库

 

jview.exe > Command-line loader for Java Java的命令行装载者

 

krnl386.exe > Core Component for Windows 2000 2000的核心组件

 

label.exe > Change label for drives 改变驱动器的卷标

 

lcwiz.exe > License Compliance Wizard for local or remote systems. 许可证符合向导

 

ldifde.exe > LDIF cmd line manager LDIF目录交换命令行管理

 

licmgr.exe > Terminal Server License Manager 终端服务许可协议管理

 

lights.exe > display connection status lights 显示连接状况

 

llsmgr.exe > Windows 2000 License Manager 2000许可协议管理

 

llssrv.exe > Start the license Server 启动许可协议服务器

 

lnkstub.exe >

 

locator.exe > RPC Locator 远程定位

 

lodctr.exe > Load perfmon counters 调用性能计数

 

logoff.exe > Log current user off. 注销用户

 

lpq.exe > Displays status of a remote LPD queue 显示远端的LPD打印队列的状态,显示被送到基于Unix的服务器的打印任务

 

lpr.exe > Send a print job to a network printer. 重定向打印任务到网络中的打印机。通常用于Unix客户打印机将打印任务发送给连接了打印设备的NT的打印机服务器。

 

lsass.exe > LSA Executable and Server DLL 运行LSAServerDLL

 

lserver.exe > Specifies the new DNS domain for the default server 指定默认Server新的DNS

 

macfile.exe > Used for managing MACFILES 管理MACFILES

 

magnify.exe > Used to magnify the current screen 放大镜

 

makecab.exe > MS Cabinet Maker 制作CAB文件

 

mdm.exe > Machine Debug Manager 机器调试管理

 

mem.exe > Display current Memory stats 显示内存状态

 

migpwd.exe > Migrate passwords. 迁移密码

 

mmc.exe > Microsoft Management Console 控制台

 

mnmsrvc.exe > Netmeeting Remote Desktop Sharing NetMeeting远程桌面共享

 

mobsync.exe > Manage Synchronization. 同步目录管理器

 

mountvol.exe > Creates, deletes, or lists a volume mount point. 创建、删除或列出卷的装入点。

 

mplay32.exe > MS Media Player 媒体播放器

 

mpnotify.exe > Multiple Provider Notification application 多提供者通知应用程序

 

mq1sync.exe >

 

mqbkup.exe > MS Message Queue Backup and Restore Utility 信息队列备份和恢复工具

 

mqexchng.exe > MSMQ Exchange Connector Setup 信息队列交换连接设置

 

mqmig.exe > MSMQ Migration Utility 信息队列迁移工具

 

mqsvc.exe > ?

 

mrinfo.exe > Multicast routing using SNMP 使用SNMP多点传送路由

 

mscdexnt.exe > Installs MSCD (MS CD Extensions) 安装MSCD

 

msdtc.exe > Dynamic Transaction Controller Console 动态事务处理控制台

 

msg.exe > Send a message to a user local or remote. 发送消息到本地或远程客户

 

mshta.exe > HTML Application HOST HTML应用程序主机

 

msiexec.exe > Starts Windows Installer Program 开始Windows安装程序

 

mspaint.exe > Microsoft Paint 画板

 

msswchx.exe >

 

mstask.exe > Task Schedule Program 任务计划表程序

 

mstinit.exe > Task scheduler setup 任务计划表安装

 

narrator.exe > Program will allow you to have a narrator for reading. Microsoft讲述人

 

nbtstat.exe > Displays protocol stats and current TCP/IP connections using NBT 使用 NBTTCP/IP 上的 NetBIOS)显示协议统计和当前 TCP/IP 连接。

 

nddeapir.exe > NDDE API Server side NDDE API服务器端

 

net.exe > Net Utility 详细用法看/

 

net1.exe > Net Utility updated version from MS Net的升级版

 

netdde.exe > Network DDE will install itself into the background 安装自己到后台

 

netsh.exe > Creates a shell for network information 用于配置和监控 Windows 2000 命令行脚本接口。

 

netstat.exe > Displays current connections. 显示协议统计和当前的 TCP/IP 网络连接。

 

nlsfunc.exe > Loads country-specific information 加载特定国家(地区)的信息。Windows 2000 MS-DOS 子系统不使用该命令。接受该命令只是为了与 MS-DOS 文件兼容。

 

notepad.exe > Opens Windows 2000 Notepad 记事本

 

nslookup.exe > Displays information for DNS 该诊断工具显示来自域名系统 (DNS) 名称服务器的信息。

 

ntbackup.exe > Opens the NT Backup Utility 备份和故障修复工具

 

ntbooks.exe > Starts Windows Help Utility 帮助

 

ntdsutil.exe > Performs DB maintenance of the ADSI 完成ADSIDB的维护

 

ntfrs.exe > NT File Replication Service NT文件复制服务

 

ntfrsupg.exe >

 

ntkrnlpa.exe > Kernel patch 核心补丁

 

ntoskrnl.exe > Core NT Kernel KT的核心

 

ntsd.exe >

 

ntvdm.exe > Simulates a 16-bit Windows environment 模拟16Windows环境

 

nw16.exe > Netware Redirector NetWare转向器

 

nwscript.exe > runs netware scripts 运行Netware脚本

 

odbcad32.exe > ODBC 32-bit Administrator 32ODBC管理

 

odbcconf.exe > Configure ODBC driver's and data source's from command line 命令行配置ODBC驱动和数据源

 

os2.exe > An OS/2 Warp Server (os2 /o) OS/2

 

os2srv.exe > An OS/2 Warp Server OS/2

 

os2ss.exe > An OS/2 Warp Server OS/2

 

osk.exe > On Screen Keyboard 屏幕键盘

 

packager.exe > Windows 2000 Packager Manager 对象包装程序

 

pathping.exe > Combination of Ping and Tracert 包含PingTracert的程序

 

pax.exe > is a POSIX program and path names used as arguments must be specified in POSIX format. Use "//C/Users/Default" instead of "C:\USERS\DEFAULT." 启动便携式存档互换 (Pax) 实用程序

 

pentnt.exe > Used to check the Pentium for the floating point division error. 检查Pentium的浮点错误

 

perfmon.exe > Starts Windows Performance Monitor 性能监视器

 

ping.exe > Packet Internet Groper 验证与远程计算机的连接

 

posix.exe > Used for backward compatibility with Unix 用于兼容Unix

 

print.exe > Cmd line used to print files 打印文本文件或显示打印队列的内容。

 

progman.exe > Program manager 程序管理器

 

proquota.exe > Profile quota program

 

psxss.exe > POSIX Subsystem Application Posix子系统应用程序

 

qappsrv.exe > Displays the available application terminal servers on the network

在网络上显示终端服务器可用的程序

 

qprocess.exe > Display information about processes local or remote 在本地或远程显示进程的信息(需终端服务)

 

query.exe > Query TERMSERVER user process and sessions 查询进程和对话

 

quser.exe > Display information about a user logged on 显示用户登陆的信息(需终端服务)

 

qwinsta.exe > Display information about Terminal Sessions. 显示终端服务的信息

 

rasadmin.exe > Start the remote access admin service 启动远程访问服务

 

rasautou.exe > Creates a RAS connection 建立一个RAS连接

 

rasdial.exe > Dial a connection 拨号连接

 

rasphone.exe > Starts a RAS connection 运行RAS连接

 

rcp.exe > Copies a file from and to a RCP service. Windows 2000 计算机和运行远程外壳端口监控程序 rshd 的系统之间复制文件

 

rdpclip.exe > RdpClip allows you to copy and paste files between a terminal session and client console session. 再终端和本地复制和粘贴文件

 

recover.exe > Recovers readable information from a bad or defective disk 从坏的或有缺陷的磁盘中恢复可读取的信息。

 

redir.exe > Starts the redirector service 运行重定向服务

 

regedt32.exe > 32-bit register service 32位注册服务

 

regini.exe > modify registry permissions from within a script 用脚本修改注册许可

 

register.exe > Register a program so it can have special execution characteristics. 注册包含特殊运行字符的程序

 

regsvc.exe >

 

regsvr32.exe > Registers and unregister's dll's. As to how and where it register's them I dont know. 注册和反注册DLL

 

regtrace.exe > Options to tune debug options for applications failing to dump trace statements

Trace 设置

regwiz.exe > Registration Wizard 注册向导

 

remrras.exe >

 

replace.exe > Replace files 用源目录中的同名文件替换目标目录中的文件。

 

reset.exe > Reset an active section 重置活动部分

 

rexec.exe > Runs commands on remote hosts running the REXEC service. 在运行 REXEC 服务的远程计算机上运行命令。rexec 命令在执行指定命令前,验证远程计算机上的用户名,只有安装了 TCP/IP 协议后才可以使用该命令。

 

risetup.exe > Starts the Remote Installation Service Wizard. 运行远程安装向导服务

 

route.exe > display or edit the current routing tables. 控制网络路由表

 

routemon.exe > no longer supported 不再支持了!

 

router.exe > Router software that runs either on a dedicated DOS or on an OS/2 system. Route软件在 DOS或者是OS/2系统

 

rsh.exe > Runs commands on remote hosts running the RSH service 在运行 RSH 服务的远程计算机上运行命令

 

rsm.exe > Mounts and configures remote system media 配置远程系统媒体

 

rsnotify.exe > Remote storage notification recall 远程存储通知回显

 

rsvp.exe > Resource reservation protocol 源预约协议

 

runas.exe > RUN a program as another user 允许用户用其他权限运行指定的工具和程序

 

rundll32.exe > Launches a 32-bit dll program 启动32DLL程序

 

runonce.exe > Causes a program to run during startup 运行程序再开始菜单中

 

rwinsta.exe > Reset the session subsystem hardware and software to known initial values 重置会话子系统硬件和软件到最初的值

 

savedump.exe > Does not write to e:\winnt\user.dmp 不写入User.dmp

 

scardsvr.exe > Smart Card resource management server 子能卡资源管理服务器

 

schupgr.exe > It will read the schema update files (.ldf files) and upgrade the schema. (part of ADSI) 读取计划更新文件和更新计划

 

secedit.exe > Starts Security Editor help 自动安全性配置管理

 

services.exe > Controls all the services 控制所有服务

 

sethc.exe > Set High Contrast - changes colours and display mode Logoff to set it back to normal 设置高对比

 

setreg.exe > Shows the Software Publishing State Key Values 显示软件发布的国家语言

 

setup.exe > GUI box prompts you to goto control panel to configure system components 安装程序(转到控制面板)

 

setver.exe > Set Version for Files 设置 MS-DOS 子系统向程序报告的 MS-DOS 版本号

 

sfc.exe > System File Checker test and check system files for integrity 系统文件检查

 

sfmprint.exe > Print Services for Macintosh 打印Macintosh服务

 

sfmpsexe.exe >

 

sfmsvc.exe >

 

shadow.exe > Monitor another Terminal Services session. 监控另外一台中端服务器会话

 

share.exe > Windows 2000 MS-DOS 子系统不使用该命令。接受该命令只是为了与 MS-DOS 文件兼容

 

shmgrate.exe >

 

shrpubw.exe > Create and Share folders 建立和共享文件夹

 

sigverif.exe > File Signature Verification 文件签名验证

 

skeys.exe > Serial Keys utility 序列号制作工具

 

smlogsvc.exe > Performance Logs and Alerts 性能日志和警报

 

smss.exe >

 

sndrec32.exe > starts the Windows Sound Recorder 录音机

 

sndvol32.exe > Display the current volume information 显示声音控制信息

 

snmp.exe > Simple Network Management Protocol used for Network Mangement 简单网络管理协议

 

snmptrap.exe > Utility used with SNMP SNMP工具

 

sol.exe > Windows Solitaire Game 纸牌

 

sort.exe > Compares files and Folders 读取输入、排序数据并将结果写到屏幕、文件和其他设备上

 

SPOOLSV.EXE > Part of the spooler service for printing 打印池服务的一部分

 

sprestrt.exe >

 

srvmgr.exe > Starts the Windows Server Manager 服务器管理器

 

stimon.exe > WDM StillImage- > Monitor

 

stisvc.exe > WDM StillImage- > Service

 

subst.exe > Associates a path with a drive letter 将路径与驱动器盘符关联

 

svchost.exe > Svchost.exe is a generic host process name for services that are run from dynamic-link libraries (DLLs). DLL得主进程

 

syncapp.exe > Creates Windows Briefcase. 创建Windows文件包

 

sysedit.exe > Opens Editor for 4 system files 系统配置编辑器

 

syskey.exe > Encrypt and secure system database NT账号数据库按群工具

 

sysocmgr.exe > Windows 2000 Setup 2000安装程序

 

systray.exe > Starts the systray in the lower right corner. 在低权限运行systray

 

taskman.exe > Task Manager 任务管理器

 

taskmgr.exe > Starts the Windows 2000 Task Manager 任务管理器

 

tcmsetup.exe > telephony client wizard 电话服务客户安装

 

tcpsvcs.exe > TCP Services TCP服务

 

.exe > Telnet Utility used to connect to Telnet Server

 

termsrv.exe > Terminal Server 终端服务

 

tftp.exe > Trivial FTP 将文件传输到正在运行 TFTP 服务的远程计算机或从正在运行 TFTP 服务的远程计算机传输文件

 

tftpd.exe > Trivial FTP Daemon

 

themes.exe > Change Windows Themes 桌面主题

 

tlntadmn.exe > Telnet Server Administrator Telnet服务管理

 

tlntsess.exe > Display the current Telnet Sessions 显示目前的Telnet会话

 

tlntsvr.exe > Start the Telnet Server 开始Telnet服务

 

tracert.exe > Trace a route to display paths 该诊断实用程序将包含不同生存时间 (TTL) 值的 Internet 控制消息协议 (ICMP) 回显数据包发送到目标,以决定到达目标采用的路由

 

tsadmin.exe > Terminal Server Administrator 终端服务管理器

 

tscon.exe > Attaches a user session to a terminal session. 粘贴用户会话到终端对话

 

tsdiscon.exe > Disconnect a user from a terminal session 断开终端服务的用户

 

tskill.exe > Kill a Terminal server process 杀掉终端服务

 

tsprof.exe > Used with Terminal Server to query results. 用终端服务得出查询结果

 

tsshutdn.exe > Shutdown the system 关闭系统

 

unlodctr.exe > Part of performance monitoring 性能监视器的一部分

 

upg351db.exe > Upgrade a jet database 升级Jet数据库

 

ups.exe > UPS service UPS服务

 

user.exe > Core Windows Service Windows核心服务

 

userinit.exe > Part of the winlogon process Winlogon进程的一部分

 

usrmgr.exe > Start the windows user manager for domains 域用户管理器

 

utilman.exe > This tool enables an administrator to designate which computers automatically open accessibility tools when Windows 2000 starts. 指定2000启动时自动打开那台机器

 

verifier.exe > Driver Verifier Manager Driver Verifier Manager

 

vwipxspx.exe > Loads IPX/SPX VDM 调用IPX/SPX VDM

 

w32tm.exe > Windows Time Server 时间服务器

 

wextract.exe > Used to extract windows files 解压缩Windows文件

 

winchat.exe > Opens Windows Chat 打开Windows聊天

 

winhlp32.exe > Starts the Windows Help System 运行帮助系统

 

winlogon.exe > Used as part of the logon process. Logon进程的一部分

 

winmine.exe > windows Game 挖地雷

 

winmsd.exe > Windows Diagnostic utility 系统信息

 

wins.exe > Wins Service Wins服务

 

winspool.exe > Print Routing 打印路由

 

winver.exe > Displays the current version of Windows 显示Windows版本

 

wizmgr.exe > Starts Windows Administration Wizards Windows管理向导

 

wjview.exe > Command line loader for Java 命令行调用Java

 

wowdeb.exe > . For starters, the 32-bit APIs require that the WOWDEB.EXE task runs in the target debugee's VM 启动时,32API需要

 

wowexec.exe > For running Windows over Windows Applications Windows应用程序上运行Windows

 

wpnpinst.exe > ?

 

write.exe > Starts MS Write Program 写字板

 

wscript.exe > Windows Scripting Utility 脚本工具

 

wupdmgr.exe > Starts the Windows update Wizard (Internet) 运行Windows升级向导

 

xcopy.exe > Used to copy directories 复制文件和目录,包括子目录

修改注册表加强Win 2000安全

资料编号:23760来源:电脑报 发布:zwh时间:2003.04.14 15:42人气:841 关闭窗口

 

1、设置生存时间

 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

 

DefaultTTL REG_DWORD 0-0xff(0-255 十进制,默认值128)

 

说明:指定传出IP数据包中设置的默认生存时间(TTL)值。TTL决定了IP数据包在到达目标前在网络中生存的最大时间。它实际上限定了IP数据包在丢弃前允许通过的路由器数量.有时利用此数值来探测远程主机操作系统。

 

2、防止ICMP重定向报文的攻击

 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

 

EnableICMPRedirects REG_DWORD 0x0(默认值为0x1)

 

说明:该参数控制Windows 2000是否会改变其路由表以响应网络设备(如路由器)发送给它的ICMP重定向消息,有时会被利用来干坏事.Win2000中默认值为1,表示响应ICMP重定向报文。

 

3、禁止响应ICMP路由通告报文

 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Inter

 

faces\interface

 

PerformRouterDiscovery REG_DWORD 0x0(默认值为0x2)

 

说明:“ICMP路由公告”功能可造成他人计算机的网络连接异常,数据被窃听,计算机被用于流量攻击等严重后果.此问题曾导致校园网某些局域网大面积,长时间的网络异常。因此建议关闭响应ICMP路由通告报文.Win2000中默认值为2,表示当DHCP发送路由器发现选项时启用。

 

4、防止SYN洪水攻击

 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

 

SynAttackProtect REG_DWORD 0x2(默认值为0x0)

 

说明:SYN攻击保护包括减少SYN-ACK重新传输次数,以减少分配资源所保留的时间。路由缓存项资源分配延迟,直到建立连接为止.如果synattackprotect=2,则AFD的连接指示一直延迟到三路握手完成为止.注意,仅在TcpMaxHalfOpenTcpMaxHalfOpenRetried设置超出范围时,保护机制才会采取措施。

 

5、禁止C$D$一类的缺省共享

 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters

 

AutoShareServerREG_DWORD0x0

 

6、禁止ADMIN$缺省共享

 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters

 

AutoShareWksREG_DWORD0x0

 

7、限制IPC$缺省共享

 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa

 

restrictanonymous REG_DWORD 0x0 缺省

 

0x1 匿名用户无法列举本机用户列表

 

0x2 匿名用户无法连接本机IPC$共享

 

说明:不建议使用2,否则可能会造成你的一些服务无法启动,如SQL Server

 

8、不支持IGMP协议

 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

 

IGMPLevel REG_DWORD 0x0(默认值为0x2)

 

说明:记得Win9x下有个bug,就是用可以用IGMP使别人蓝屏,修改注册表可以修正这个bug.Win2000虽然没这个bug了,但IGMP并不是必要的,因此照样可以去掉。改成0后用route print将看不到那个讨厌的224.0.0.0项了。

 

9、设置arp缓存老化时间设置

 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

 

ArpCacheLifeREG_DWORD 0-0xFFFFFFFF(秒数,默认值为120)

 

ArpCacheMinReferencedLifeREG_DWORD 0-0xFFFFFFFF(秒数,默认值为600)

 

说明:如果ArpCacheLife大于或等于ArpCacheMinReferencedLife,则引用或未引用的ARP缓存项在ArpCacheLife秒后到期。如果ArpCacheLife小于ArpCacheMinReferencedLife,未引用项在ArpCacheLife秒后到期,而引用项在ArpCacheMinReferencedLife秒后到期。每次将出站数据包发送到项的IP地址时,就会引用ARP缓存中的项。

 

10、禁止死网关监测技术

 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

 

EnableDeadGWDetect REG_DWORD 0x0(默认值为ox1)

 

说明:如果你设置了多个网关,那么你的机器在处理多个连接有困难时,就会自动改用备份网关。有时候这并不是一项好主意,建议禁止死网关监测。

 

11、不支持路由功能

 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

 

IPEnableRouter REG_DWORD 0x0(默认值为0x0)

 

说明:把值设置为0x1可以使Win2000具备路由功能,由此带来不必要的问题。

 

12、做NAT时放大转换的对外端口最大值

 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

 

MaxUserPort REG_DWORD 5000-65534(十进制)(默认值0x1388--十进制为5000)

 

说明:当应用程序从系统请求可用的用户端口数时,该参数控制所使用的最大端口数。正常情况下,短期端口的分配数量为1024-5000。将该参数设置到有效范围以外时,就会使用最接近的有效数值(500065534)。使用NAT时建议把值放大点。

 

13、修改MAC地址

 

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\

 

找到右窗口的说明为"网卡"的目录,

 

比如说是{4D36E972-E325-11CE-BFC1-08002BE10318}

 

展开之,在其下的000000010002...的分支中找到"DriverDesc"的键值为你网卡的说明,比如说"DriverDesc"的值为"Intel(R) 82559 Fast Ethernet LAN on Motherboard"然后在右窗口新建一字符串值,名字为"Networkaddress",内容为你想要的MAC值,比如说是"004040404040"然后重起计算机,ipconfig /all看看。

曾几何时,大家都有想过在命令行下改IP和网关。以前在NT4下实现起来过于麻烦,现在Windows 2000下的Netsh命令能实现该功能了。

 

Netsh 是本地或远程计算机的 Windows 2000 网络组件的命令行和脚本实用程序。为了存档或配置其他服务器,Netsh 实用程序也可以将配置脚本保存在文本文件中。

 

Netsh 实用程序是一个外壳,它通过附加的"Netsh 帮助 DLL",可以支持多个 Windows 2000 组件。"Netsh 帮助 DLL"提供用来监视或配置特定 Windows 2000 网络组件的其他命令,从而扩展了 Netsh 的功能。每个"Netsh 帮助 DLL"都为特定的网络组件提供了一个环境和一组命令。每个环境中都可以有子环境。例如,在路由环境中存在子环境 Ip Ipx,它们将 IP 路由和 IPX 路由命令集中在一起。

 

Netsh 命令行选项包括下列各项:

 

用法: netsh [-a AliasFile] [-c Context] [-r RemoteMachine]

[Command | -f ScriptFile]

 

下列指令有效:

 

此上下文中的命令:

? - 显示命令列表。

aaaa - 更改到 `aaaa' 上下文。

add - 将一个配置项添加到项目列表中。

delete - 在项目列表上删除一个配置项目。

dhcp - 更改到 `dhcp' 上下文。

dump 0 - 显示一个配置脚本。

exec - 运行一个脚本文件。

help - 显示命令列表。

interface - 更改到 `interface' 上下文。

ras - 更改到 `ras' 上下文。

routing - 更改到 `routing' 上下文。

set - 更新配置设置。

show - 显示信息

wins - 更改到 `wins' 上下文。

 

下列的子上下文可用:

routing interface ras dhcp wins aaaa

 

若需要命令的更多帮助信息,请键入命令,

后面跟 ?

-a AliasFile

指定使用了一个别名文件。别名文件包含 netsh 命令列表和一个别名版本,所以可以使用别名命令行替换 netsh 命令。可以使用别名文件将其他平台中更熟悉的命令映射到适当的 netsh 命令。

 

-c Context

指定对应于已安装的支持 DLL 的命令环境。

 

命令

指定要执行的 netsh 命令。

 

-f ScriptFile

指定运行 ScriptFile 文件中所有的 netsh 命令。

 

-r RemoteMachine

指定在远程计算机上运行 netsh 命令,由名称或 IP 地址来指定远程计算机。

 

您可以将命令缩写为意义明确的最短的字符串。例如,发布 sh ip int 命令相当于发布 show ip interfaceNetsh 命令可以是全局的或特定环境的。全局命令可以在任何环境中发布,并用于一般的 Netsh 实用程序功能。特定环境的命令随环境而变化。您可以将发布的命令记录在日志文件中,以创建 netsh 命令会话的审核踪迹。

 

列出了 netsh 全局命令。

 

命令 说明

.. 上移一个环境等级。

? help 显示命令行"帮助"

show version 显示 Windows Netsh 实用程序的当前版本。

show netdlls 显示已安装的"Netsh 帮助 DLL"的当前版本。

add helper 添加"Netsh 帮助 DLL"

delete helper 删除"Netsh 帮助 DLL"

show helper 显示已安装的"Netsh 帮助 DLL"

cmd 创建 Windows 2000 命令窗口。

online 将当前模式设置为联机。

offline 将当前模式设置为脱机。

set mode 将当前模式设置为联机或脱机。

show mode 显示当前模式。

flush 丢弃以脱机模式进行的任何更改。

commit 提交以脱机模式进行的更改。

set audit-logging 打开或关闭记录工具。

show audit-logging 显示当前的审核记录设置。

set loglevel 设置记录信息的级别

show loglevel 显示记录信息的级别。

set machine 配置执行 netsh 命令的计算机。

show machine 显示执行 netsh 命令的计算机。

exec 执行包括 netsh 命令的脚本文件。

quit bye exit 退出 Netsh 实用程序。

add alias 向现有命令添加别名。

delete alias 删除现有命令的别名。

show alias 显示所有已定义的别名。

dump 将配置写入文本文件。

popd 从堆栈中弹出环境的脚本命令。

pushd 将当前的环境推入堆栈的脚本命令。

 

Netsh 实用程序有如下命令模式:

 

联机

联机模式下,在 Netsh 命令提示符下发布的命令被立即执行。

 

脱机

脱机模式下,将在 Netsh 命令提示符下积累发布的命令,并通过发布 commit 全局命令来按照批处理方式执行。可以通过发布 flush 全局命令来丢弃积累的命令。

 

脚本

使用 -f 命令行选项,或在 Netsh 命令提示符下发布 exec 全局命令,可以执行指定文件中所有的 netsh 命令。

 

要创建当前配置的脚本,请使用 dump 全局命令。dump 命令根据 netsh 命令输出当前运行的配置。可以使用该命令创建的脚本来配置新的服务器或重新配置现有的服务器。如果要对组件的配置作很大的更改,推荐您使用 dump 命令开始配置会话,以防在进行更改前需要还原配置。

 

Interface 命令

下表列出了可在 Windows 2000 命令提示符下键入的 netsh 命令,这些命令用于管理运行 Windows 2000 Server "路由和远程访问"服务的计算机上的接口设置。如果对某个特殊功能有多个命令,则在每个命令之间用斜线 (/) 分隔。

 

当在命令提示符下键入命令时,请在每个命令前加上 netsh。要获得每个命令的精确语法,可在命令之后键入 ?。选项例如,要获得 netsh interface 命令的命令行"帮助",请在命令提示符下键入 netsh interface?

 

命令 说明

interface set/show interface 启用、禁用、连接、断开连接以及显示请求拨号接口的配置。

interface set/show credentials 在请求拨号接口上配置或显示用户名、密码和域名。

 

……… (省略二、三千字)

 

 

言归正传,现在来看看WIN2000下的网络设置的配置。

 

D:\>netsh

netsh>interface

interface>dump

#========================

# 接口配置

#========================

pushd interface

 

reset all

 

 

popd

# 接口配置结束

 

# ----------------------------------

# 接口 IP 配置

# ----------------------------------

pushd interface ip

 

 

# "本地连接 2" 的接口 IP 配置

 

set address name = "本地连接 2" source = dhcp

set dns name = "本地连接 2" source = dhcp

set wins name = "本地连接 2" source = dhcp

 

# "本地连接" 的接口 IP 配置

 

set address name = "本地连接" source = static addr = 192.168.1.10 mask = 255.255.255.0

set address name = "本地连接" gateway = 192.168.0.1 gwmetric = 1

set dns name = "本地连接" source = static addr = 192.168.0.1

set wins name = "本地连接" source = static addr = none

 

 

popd

# 接口 IP 配置结束

 

 

如果,你想快速修改一个本地IP地址。

你可以先用文本写入以下的内容:

 

interface ip

set address 本地连接 static 192.168.5.10 255.255.255.0 192.168.0.1 1

^^^ ^^^ ^^^ ^^^ ^^

接口名称 IP地址 子网掩码 网关 接口跃点数

 

如上保存为 local.sh

 

D:\>netsh exec local.sh

JQuery UI Theming/API

 

UI/Theming/API

From jQuery JavaScript Library

Jump to: navigation, search

« Back to jQuery UI Theming

Contents

  • 1 The jQuery UI CSS Framework

[edit]

The jQuery UI CSS Framework

jQuery UI includes a robust CSS Framework designed for building custom jQuery widgets. The framework includes classes that cover a wide array of common user interface needs, and can be manipulated using jQuery UI ThemeRoller. By building your UI components using the jQuery UI CSS Framework, you will be adopting shared markup conventions and allowing for ease of code integration across the plugin community at large.

[edit]

Framework Classes

The following CSS classes are split between ui.core.css and ui.theme.css, depending on whether styles are fixed and structural, or themeable (colors, fonts, backgrounds, etc) respectively. These classes are designed to be applied to User Interface elements to achieve visual consistency across an application and allow components to be themeable by jQuery UI ThemeRoller.

[edit]

Layout Helpers

  • .ui-helper-hidden: Applies display: none to elements.
  • .ui-helper-hidden-accessible: Applies accessible hiding to elements (via abs positioning off the page)
  • .ui-helper-reset:  A basic style reset for UI elements. Resets things such as padding, margins, text-decoration, list-style, etc.
  • .ui-helper-clearfix: Applies float wrapping properties to parent elements
  • .ui-helper-zfix: Applies iframe "fix" css to iframe elements when needed in overlays.

[edit]

Widget Containers

  • .ui-widget: Class to be applied on outer container of all widgets. Applies font family and font size to widget. Also applies same family and 1em font size to child form elements specifically, to combat inheritance issues in Win browsers.
  • .ui-widget-header: Class to be applied to header containers. Applies header container styles to an element and its child text, links, and icons.
  • .ui-widget-content: Class to be applied to content containers. Applies content container styles to an element and its child text, links, and icons. (can be applied to parent or sibling of header)

[edit]

Interaction States

  • .ui-state-default: Class to be applied to clickable button-like elements. Applies "clickable default" container styles to an element and its child text, links, and icons.
  • .ui-state-hover: Class to be applied on mouseover to clickable button-like elements. Applies "clickable hover" container styles to an element and its child text, links, and icons.
  • .ui-state-focus: Class to be applied on keyboard focus to clickable button-like elements. Applies "clickable hover" container styles to an element and its child text, links, and icons.
  • .ui-state-active: Class to be applied on mousedown to clickable button-like elements. Applies "clickable active" container styles to an element and its child text, links, and icons.

[edit]

Interaction Cues

  • .ui-state-highlight: Class to be applied to highlighted or selected elements. Applies "highlight" container styles to an element and its child text, links, and icons.
  • .ui-state-error: Class to be applied to error messaging container elements. Applies "error" container styles to an element and its child text, links, and icons.
  • .ui-state-error-text: An additional class that applies just the error text color without background. Can be used on form labels for instance. Also applies error icon color to child icons.
  • .ui-state-disabled: Applies a dimmed opacity to disabled UI elements. Meant to be added in addition to an already-styled element.
  • .ui-priority-primary: Class to be applied to a priority-1 button in situations where button hierarchy is needed. Applies bold text.
  • .ui-priority-secondary: Class to be applied to a priority-2 button in situations where button hierarchy is needed. Applies normal weight text and slight transparency to element.

[edit]

Icons

[edit]

States and images

  • .ui-icon: Base class to be applied to an icon element. Sets dimensions to 16px square block, hides inner text, sets background image to "content" state sprite image. Note: .ui-icon class will be given a different sprite background image depending on its parent container. For example, a ui-icon element within a ui-state-default container will get colored according to the ui-state-default's icon color.

[edit]

Icon types

After declaring a ".ui-icon" class, you can follow up with a second class describing the type of icon you'd like. Icon classes generally follow a syntax of .ui-icon-{icon type}-{icon sub description}-{direction}.

For example, a single triangle icon pointing to the right looks like this: .ui-icon-triangle-1-e

jQuery UI's ThemeRoller provides the full set of CSS framework icons in its preview column. Hover over them to see the class name.

[edit]

Misc Visuals

[edit]

Corner Radius helpers

  • .ui-corner-tl: Applies corner-radius to top left corner of element.
  • .ui-corner-tr: Applies corner-radius to top right corner of element.
  • .ui-corner-bl: Applies corner-radius to bottom left corner of element.
  • .ui-corner-br: Applies corner-radius to bottom right corner of element.
  • .ui-corner-top: Applies corner-radius to both top corners of element.
  • .ui-corner-bottom: Applies corner-radius to both bottom corners of element.
  • .ui-corner-right: Applies corner-radius to both right corners of element.
  • .ui-corner-left: Applies corner-radius to both left corners of element.
  • .ui-corner-all: Applies corner-radius to all 4 corners of element.

[edit]

Overlay & Shadow

  • .ui-widget-overlay: Applies 100% wxh dimensions to an overlay screen, along with background color/texture, and screen opacity.
  • .ui-widget-shadow: Class to be applied to overlay widget shadow elements. Applies background color/texture, custom corner radius, opacity, top/left offsets and shadow "thickness". Thickness is applied via padding to all sides of a shadow that is set to match the dimensions of the overlay element. Offsets are applied via top and left margins (can be positive or negative).

 

源文档 <http://docs.jquery.com/UI/Theming/API>

gear database api

 

Database API

The Database API provides browser-local relational data storage to your JavaScript web application. Gears uses the open source SQLite database system.

Contents

  1. Overview
  2. Example
  1. Classes
    1. Database
    2. ResultSet
  1. Location of Database Files
  1. Local Modifications to SQLite
  2. Full-Text Search

Overview

The Database API is used to persistently store an application user's data on the user's computer. Data is stored using the same-origin security policy, meaning that a web application cannot access data outside of its domain (see Security).

Data is stored and retrieved by executing SQL statements. For information on the SQL syntax supported, see the SQLite document "SQL as Understood By SQLite", and also local modifications to SQLite, below. Gears includes SQLite's full-text search extension fts2.

Security considerations

SQL statements passed to execute() can and should use bind parameters (?) to prevent SQL injection attacks. Read about database security best practices on the Security page.

Permission

This API requires user permission. If you would like to customize the default dialog, you can explicitly call google.gears.factory.getPermission() - see how.

Example

<script type="text/javascript" src="gears_init.js"></script>

<script type="text/javascript">

var db = google.gears.factory.create('beta.database');

db.open('database-test');

db.execute('create table if not exists Test' +

           ' (Phrase text, Timestamp int)');

db.execute('insert into Test values (?, ?)', ['Monkey!', new Date().getTime()]);

var rs = db.execute('select * from Test order by Timestamp desc');

while (rs.isValidRow()) {

  alert(rs.field(0) + '@' + rs.field(1));

  rs.next();

}

rs.close();

</script>

Classes

Database class

   void      open([name])

   ResultSet execute(sqlStatement, [argArray])

   void      close()

   void      remove()

   readonly attribute int lastInsertRowId

   readonly attribute int rowsAffected

ResultSet class

   boolean isValidRow()

   void    next()

   void    close()

   int     fieldCount()

   string  fieldName(int fieldIndex)

   variant field(int fieldIndex)

   variant fieldByName(string fieldName)

Database class

Methods

open([name])

 

Return value:

void

Parameters:

name - optional.

Exceptions:

Throws an exception if an error occurs.

 

Currently the name, if supplied and of length greater than zero, must consist only of visible ASCII characters excluding the following characters:

 

/ \ : * ? " < > | ; ,

 

Otherwise, open() will throw an exception. Before finalization of the API we expect to remove this restriction.

Description:

Opens the database name, or an unnamed database if name is omitted. name is local to the application's origin (see Security).

execute(sqlStatement, [argArray])

 

Return Value

ResultSet

Parameters

sqlStatement is a string containing a SQL statement, with ? as a placeholder for bind parameters.

 

argArray is an optional array of bind parameters to be substituted for the placeholders.

Exceptions

Throws an exception if the SQL statement fails to execute. See the exception object's message attribute for details.

 

Note: If multiple processes (including Workers) attempt to write to the database at the same time, one can fail. It is up to the application to retry in these situations.

Description

Substitute zero or more bind parameters from argArray into sqlStatement and execute the resulting SQL statement. There must be exactly as many items in argArray as their are ? placeholders in sqlStatement. argArray can be omitted if there are no placeholders. The results of executing the statement are returned in a ResultSet.

 

open() must be called and must return successfully before calling execute().

Example:

resultSet = db.execute (

  'INSERT INTO MYTABLE VALUES (?, ?, ?) WHERE id=?',

  [1, 2, 'three four', 5]

);

 

SQLite automatically quote-escapes bind parameters, so in execution the statement expands to:

'INSERT INTO MYTABLE VALUES (1, 2, "three four") WHERE id=5'

 

For information on SQL syntax, see the SQLite documentation "SQL as Understood By SQLite"

 

close()

 

Return value:

void

Exceptions:

Throws an exception if an error occurs.

Description:

Closes the database connection, if any, currently associated with this Database instance. Calling Database.close() is not required.

 

 

remove()

 

Return value:

void

Description:

Completely deletes the currently opened database. Closes the database first if necessary.

Attributes

lastInsertRowId

 

Return value:

readonly attribute int

Description:

Represents the rowid of the most recent insert on this Database instance.

Returns zero if no inserts have ever occurred on this instance.

 

Note that all rows in every table have a rowid, even rows in tables that do not have integer-type primary keys. Thus, every successful insert updates this attribute.

rowsAffected

 

Return value:

readonly attribute int

Description:

Represents the number of database rows that were changed, inserted, or deleted by the most recently completed INSERT, UPDATE, or DELETE statement on this Database instance.

 

Returns zero if no row changes have ever occurred on this instance.

 

Note: An unconstrained delete of all rows in a table (DELETE FROM table) will return zero rather than the number of rows that were originally present in the table; if you need the number of rows, use DELETE FROM table WHERE 1 instead, though be aware that this is slower than an unconstrained delete.

 

ResultSet class

Back to top

A ResultSet is returned from a successful call to Database.execute(). It contains the results of executing the SQL statement.

A ResultSet is immutable, subsequent changes to the underlying database do not affect the contents.

Iterate over the rows of the result set using isValidRow(), next(), and close(), calling data extraction methods for valid rows. For example:

while (rs.isValidRow()) {

  console.log(rs.fieldName(0) + " == " + rs.field(0));

  rs.next();

}

rs.close();

Methods

isValidRow()

 

Return value:

boolean

Description:

Returns true if you can call data extraction methods.

next()

 

Return value:

void

Description:

Advances to the next row of the results.

close()

 

Return value:

void

Exceptions:

Throws an exception if an error occurs.

Description:

Releases the state associated with this result set

 

You are required to call close() when you are finished with any result set.

 

Note: there is currently a feature request to have close called automatically when the result set goes out of scope.

 

Methods for extracting data

fieldCount()

 

Return value:

int

Description:

Returns the number of fields in this result set.

fieldName(int fieldIndex)

 

Return value:

string

Exceptions:

Throws an exception if fieldIndex is out of range.

Parameters:

fieldIndex : the zero-based index of the desired field

Description:

Returns the name of the specified field in the current result set. This name is derived from the SQL statement which was executed.

field(int fieldIndex)

 

Return value:

variant

Exceptions:

Throws an exception if fieldIndex is out of range.

Parameters:

fieldIndex : the zero-based index of the desired field

Description:

Returns the contents of the specified field in the current row.

fieldByName(string fieldName)

 

Return value:

variant

Exceptions:

Throws an exception if fieldName names a nonexistent field.

Parameters:

fieldName: the name of the desired field

Description:

Returns the contents of the specified field in the current row.

 

Location of Database File

Database files that your application creates are stored on the user's computer in a location that is determined by the browser being used and the platform.

Windows Vista - Internet Explorer

Location: {FOLDERID_LocalAppDataLow}\Google\Google Gears for Internet Explorer

Example: C:\Users\Bob\AppData\LocalLow\Google\Google Gears for Internet Explorer

Windows Vista - Firefox - Database files are stored in the user local profile directory.

Location: C:\Users\<username>\AppData\Local\Mozilla\Firefox\Profiles\{profile}.default\Google Gears for Firefox

Example: C:\Users\Bob\AppData\Local\Mozilla\Firefox\Profiles\uelib44s.default\Google Gears for Firefox

Windows Vista - Chrome - Database files are stored in the user local profile directory.

Location: C:\Users\<username>\AppData\Local\Google\Chrome\User Data\Default\Plugin Data\Google Gears

Example: C:\Users\Bob\AppData\Local\Google\Chrome\User Data\Default\Plugin Data\Google Gears

Windows XP - Internet Explorer - Database files are stored in the user local profile directory.

Location: C:\Documents and Settings\<username>\Local Settings\Application Data\Google\Google Gears for Internet Explorer

Example: C:\Documents and Settings\Bob\Local Settings\Application Data\Google\Google Gears for Internet Explorer

Windows XP - Firefox - Database files are stored in the user local profile directory.

Location: C:\Documents and Settings\<username>\Local Settings\Application Data\Mozilla\Firefox\Profiles\{profile}\Google Gears for Firefox

Example: C:\Documents and Settings\Bob\Local Settings\Application Data\Mozilla\Firefox\Profiles\uelib44s.default\Google Gears for Firefox

Windows XP - Chrome - Database files are stored in the user local profile directory.

Location: C:\Documents and Settings\<username>\Local Settings\Application Data\Google\Chrome\User Data\Default\Plugin Data\Google Gears

Example: C:\Documents and Settings\Bob\Local Settings\Application Data\Google\Chrome\User Data\Default\Plugin Data\Google Gears

Mac OS X - Safari - Database files are stored in the user Application Support directory.

Location: ~/Library/Application Support/Google/Google Gears for Safari

Example: /Users/Bob/Library/Application Support/Google/Google Gears for Safari

Mac OS X - Firefox - Database files are stored in the user local profile directory.

Location: Users/<username>/Library/Caches/Firefox/Profiles/{profile}.default/Google Gears for Firefox

Example: Users/Bob/Library/Caches/Firefox/Profiles/08ywpi3q.default/Google Gears for Firefox

Linux - Firefox - Database files are stored in the user home directory.

Location: ~bob/.mozilla/firefox/<firefox's profile id>/Google Gears for Firefox

Example: ~bob/.mozilla/firefox/08ywpi3q.default/Google Gears for Firefox

Windows Mobile 5.0 and 6.0

Location: \Application Data\Google\Google Gears for Internet Explorer

 

Local Modifications to SQLite

This section describes modifications that Gears makes to SQLite.

Attached databases

The SQLite ATTACH and DETACH commands can be used to open an arbitrary SQLite database on the user's disk. For this reason, these commands have been disabled in Gears. In the future this functionality may be exposed in a way which respects the same-origin security policy.

PRAGMA settings

The SQLite PRAGMA command allows setting and inspection of various platform settings, including certain settings which could potentially be used to compromise security. At this time, Gears disables PRAGMA, though it is possible that specific PRAGMA uses may be re-enabled or exposed in the Database interface.

The default PRAGMA settings for Gears which differ from the SQLite defaults:

  • PRAGMA encoding = 'UTF-8';
    This controls the encoding used to store textual data on disk. UTF-16 encoding on disk is almost never a win on desktop machines, it is generally faster to read the smaller amount of UTF-8 data and decode it on the fly.
  • PRAGMA auto_vacuum = 1;
    Over time database files can become filled with gaps where data has been deleted. These gaps can be recovered with the VACUUM command, but VACUUM can lock the database for extended periods of time, making it a challenge to integrate into interactive applications. auto_vacuum mode recovers these gaps incrementally as they are generated.
  • PRAGMA page_size = 4096;
    Desktop operating systems mostly have default virtual memory and disk block sizes of 4k and higher.
  • PRAGMA cache_size = 2048;
    Provides 8M of page cache.
  • PRAGMA synchronous = NORMAL;
    Synchronous controls whether data is synchronized to disk before COMMIT commands return (commands not in transactions are implicitly wrapped in one). Setting synchronous to OFF can provide a significant performance boost, at the expense of potential data corruption. Much of the benefit of turning synchronous off can generally be achieved by using a combination of large transactions and WorkerPool.

 

Full-Text Search

Gears includes an SQLite extension called fts2, for "Full-Text Search". fts2 allows you to create a table and search for words in TEXT data. An fts2 table is created as follows:

db.execute('CREATE VIRTUAL TABLE recipe USING fts2(dish, ingredients)');

This creates an fts2 table named 'recipe', with fields 'dish' and 'ingredients'. All fts2 fields are of type TEXT. Data in the table is manipulated using standard SQL commands such as INSERT, UPDATE, and DELETE. Like other SQLite tables, the fts2 table has an implicit unique rowid field, which acts as a unique index.

fts2 tables have some unique properties:

  • No indices other than the rowid and full-text indices are allowed.
  • fts2 tables contain a special field with the same name as the table. This field is used in search queries, as described below.
  • Because the special field exists, is important to always list the specific fields being inserted in INSERT statements, and list specific result fields in SELECT statements. SELECT * will throw exceptions when run on an fts2 table.

Full-text Query Syntax

To query using the full-text index, use the MATCH operator as follows:

<table_or_field_name> MATCH <query>

  • If <table_or_field_name> is the name of the table, then the match is done against all fields of the table.
  • If <table_or_field_name> is the name of a field, then the match is done against that field.

 

The following returns the names of all recipes which include 'tomatoes' in any field:

var rs = db.execute('SELECT dish FROM recipe WHERE recipe MATCH ?', ['tomatoes']);

Examples of fts2 query syntax:

cheese tomatoes

Find rows containing 'cheese' and 'tomatoes' in any field.

dish:stew tomatoes

Find rows with 'stew' in the dish field, and 'tomatoes' in any field.

cheese OR tomatoes

Find rows containing either 'cheese' or 'tomatoes' in any field. Note that OR operator must be capitalized.

"green tomatoes"

Find rows where 'green' is immediately followed by 'tomatoes', in any single field.

cheese -tomatoes

Find rows containing 'cheese' in any field, and not containing 'tomatoes' in any field.

ch*

Find rows containing words which start with 'ch', including rows containing 'cheese' or 'chowder'. The '*' must come at the end of the word.

Using Indices with fts2

fts2 tables are restricted to contain only TEXT fields and the full-text index. To simulate additional indices or non-TEXT fields, an auxiliary table can be used:

db.execute('CREATE TABLE recipe_aux (dish TEXT PRIMARY KEY, rating INTEGER)');

db.execute('CREATE VIRTUAL TABLE recipe USING fts2(dish, ingredients)');

A logical row is split across the recipe and recipe_aux tables, joined on the rowid. The recipe_aux table constrains dish to be unique, and adds field rating, which will not be included in the full-text index. For example, to search for recipes with 'cheese' that have rating higher than 3:

var rs = db.execute('SELECT recipe.rowid FROM recipe, recipe_aux ' +

                    ' WHERE recipe.rowid = recipe_aux.rowid AND recipe_aux.rating > ? AND recipe MATCH ?',

                    [3, 'cheese']);

Insertions, deletions, and updates should be done within transactions to keep the tables consistent:

db.execute('BEGIN');

db.execute('INSERT INTO recipe_aux (dish, rating) VALUES (?, ?)', ['soup', 3]);

db.execute('INSERT INTO recipe (rowid, dish, ingredients) ' +

           'VALUES (last_insert_rowid(), ?, ?)',

           ['soup', 'meat carrots celery noodles']);

db.execute('COMMIT');

 

源文档 <http://code.google.com/intl/zh-CN/apis/gears/api_database.html>