中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

中国DOS联盟论坛
现在时间是 2026-08-11 14:49
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » 添加删除协议的工具snetcfg.exe 查看 2,158 回复 3
楼 主 添加删除协议的工具snetcfg.exe 发表于 2008-12-22 20:00 ·  中国 北京 鹏博士长城宽带
银牌会员
★★★★
[b]看你妹啊[/b]
积分 1,488
发帖 1,357
注册 2006-05-20 12:00
20年会员
UID 55770
状态 离线
使用这个外部工具可以实现:在通过批处理来自动安装卸载协议。或者说用来自动安装或卸载网络组件。在网上看到零散的说明,好像是说这个工具是用来安装驱动的。

如果安装了360安全萎士,可以在C:\Program Files\360safe\AntiArp 目录下找到
snetcfg.exe

卡巴斯基目录下的netcfg.exe 估计功能和SNETCFG是一样的,但是netcfg /? -h --help 等等都不显示帮助。

再有,SNETCFG是微软出的工具,如果不想在这里下载,可以到微软网站上搜索一下,如果找到下载地址,别忘记在回复贴上来一下。

下载地址1:http://upload.cn-dos.net/img/1218.rar
本帖最近评分记录 (共 1 条) 点击查看详情
评分人分数时间
HAT +4 2008-12-22 20:04
附件
snetcfg.rar (4.77 KiB, 下载附件所需积分 1 点, 下载次数: 45)

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
2 snetcfg帮助 发表于 2008-12-22 20:03 ·  中国 北京 鹏博士长城宽带
银牌会员
★★★★
[b]看你妹啊[/b]
积分 1,488
发帖 1,357
注册 2006-05-20 12:00
20年会员
UID 55770
状态 离线
算了,还是先贴一个带汉字的说明吧,不是我写的,


snetcfg.exe 的使用方法
原文出处:http://hi.baidu.com/art008/blog/item/33df98455026ad39869473f5.html
命令行下执行:snetcfg.exe /help
看看不就清楚了,超简单的英文都是,查字典也查出来了^_^
给你贴上大概翻译了一下,具体的自己根据想实现的功能摸索一下吧,
搞程序探索精神一定要有滴~~
//第一种格式:安装
snetcfg -c <p|s|c> -i <comp-id>
where,
-l provides the location of INF
//指定INF文件的完整路径
-c provides the class of the component to be installed
p == Protocol, s == Service, c == Client
//指定组件类型,P=协议,S=服务,C=客户端
-i provides the component ID
//指定组件ID

The arguments must be passed in the order shown.
//参数必须按指定顺序排列

Examples: //例子自己看吧
snetcfg -l c:\oemdir\foo.inf -c p -i foo
...installs protocol 'foo' using c:\oemdir\foo.inf

snetcfg -c s -i MS_Server
...installs service 'MS_Server'

OR
//第二种格式:查看指定组件
snetcfg -q <comp-id>
Example:
snetcfg -q MS_IPX
...displays if component 'MS_IPX' is installed

OR
//第三种格式:卸载
snetcfg -u <comp-id>
Example:
snetcfg -u MS_IPX
...uninstalls component 'MS_IPX'

OR
//第四种格式:显示所有指定类型组件
snetcfg -s <a|n>
where,
-s provides the type of components to show
a == adapters, n == net components
Examples:
snetcfg -s n
...shows all installed net components


OR
//第五种格式:显示包含某组件的路径
snetcfg -b <comp-id>
Examples:
snetcfg -b ms_tcpip
...shows binding paths containing 'ms_tcpip'


General Notes:
-v turns on the verbose mode //这个不大清楚,是开启长文件名吧,你自己试下应该就明白了
-? Displays this help


估计有翻译的不对的,呵呵不搞这个的,得凭自己研究的,或者某热心大牛,呵呵~~

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
3 吃完饭再贴snetcfg使用例子 发表于 2008-12-22 20:11 ·  中国 北京 鹏博士长城宽带
银牌会员
★★★★
[b]看你妹啊[/b]
积分 1,488
发帖 1,357
注册 2006-05-20 12:00
20年会员
UID 55770
状态 离线
查看snetcfg帮助

snetcfg -?

用snetcfg 安装卸载本地连接里的QOS 数据包计划程序:
安装QOS 数据包计划程序 snetcfg -v -l "%windir%\inf\netpschd.inf" -c s -i ms_psched
卸载QOS 数据包计划程序 snetcfg -u ms_psched

[ Last edited by yishanju on 2008-12-22 at 21:02 ]

有问题请发论坛或者自行搜索,再短消息问我的统统是SB
4 发表于 2010-05-21 14:05 ·  中国 广东 广州 电信
新手上路
积分 1
发帖 1
注册 2009-08-26 01:25
16年会员
UID 150969
性别 男
状态 离线
@echo off
set Ipx=0
for /f \"tokens=15\" %%i in (&#39;ipconfig ^|find /i \"ip address\"&#39;) do set Ipx=%%i
set Ipx=%Ipx:~10%
reg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters\" /v \"VirtualNetworkNumber\" /t REG_DWORD /d %Ipx% /f
reg add \"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\NwlnkIpx\\Parameters\" /v \"VirtualNetworkNumber\" /t REG_DWORD /d %Ipx% /f
if not exist E:\\NBMSClient\\ARP防护\\snetcfg.exe goto end
cd /d \"E:\\NBMSClient\\ARP防护\"
snetcfg.exe -l %SystemRoot%\\inf\\netnwlnk.inf -c p -i MS_NWIPX
:end
论坛跳转: