怎么启动、停止Windows的DOS命令
相关话题
在图形界面中启动、停止服务很方便,但是操作系统有时候会出故障,此时不妨使用原始的DOS命令启动、停止服务,也许会收到意想不到的效果的!下面就让小编教大家怎么启动、停止Windows的DOS命令。
启动、停止Windows的DOS命令的方法
开始→所有程序。

2附件→右键点击 命令提示符→以管理员身份运行

注意:如果不使用管理员权限的命令提示符,启动、停止服务命令就会出错!

使用 net命令加上参数可以启动服务程序(通用格式如下):
net start ServiceName(服务名称)
比如,启动主题服务:net start Themes
此时的边框、任务栏等处的视觉效果很漂亮(都需要资源支撑的)

停止服务程序(通用格式如下):
net stop ServiceName(服务名称)
比如,禁用主题服务:net stop Themes
此时,边框、任务栏等处已经变成经典模式了(节约资源)

如何正确查看命令中的服务名称?
开始→运行→输入:services.msc 点击确定(或按回车键)打开服务。

双击相应的服务(或者右键服务→属性)这里一定要注意:
命令行中引用的是服务名称(可以拉篮复制),而非显示名称,否则会出错。

因为主题服务服务名称和显示名称同样是: Themes (主题服务),所以即便是复制错误,也不会出错的。但是找一个两者不一样的服务,就要格外小心了。
比如传真服务:服务名称为:Fax ;显示服务为:传真。

还有一个需要注意的地方是,如果服务名称或参数中带有空格,需要使用双引号将其涵盖进去。否则就会显示无效服务名(系统找不到该服务)

如果不太清楚命令如何使用,可以使用命令查看帮助:
net /?

还可以使用sc命令启动、停止相应的服务,具体使用命令和参数也可以看帮助:
sc /?

如果服务使用的端口被占用,比如web服务端口80端口,可能被迅雷、QQ旋风占用,也可以通过命令调整。SC常用命令参数如下:
sc create 创建一个服务
sc delete 删除一个服务
sc query 查询服务
sc config 配置服务
sc stop 关闭服务
sc start 开启服务
sc pause 暂停服务
……

怎么启动、停止Windows的DOS命令的评论条评论