snetcfg.exe 的使用方法
原文出处:http://hi.baidu.com/art008/blog/ ... 26ad39869473f5.html
命令行下执行:snetcfg.exe /help
看看不就清楚了,超简单的英文都是,查字典也查出来了^_^
给你贴上大概翻译了一下,具体的自己根据想实现的功能摸索一下吧,
搞程序探索精神一定要有滴~~
//第一种格式:安装
snetcfg [-v] [-l <full-path-to-component-INF>] -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 [-v] -q <comp-id>
Example:
snetcfg -q MS_IPX
...displays if component 'MS_IPX' is installed
OR
//第四种格式:显示所有指定类型组件
snetcfg [-v] -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
[ Last edited by yishanju on 2008-12-22 at 21:02 ]作者: fengczf 时间: 2010-5-21 14:05 @echo off
set Ipx=0
for /f \"tokens=15\" %%i in ('ipconfig ^|find /i \"ip address\"') 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