中国DOS联盟论坛

中国DOS联盟

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

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

游客:  注册 | 登录 | 命令行 | 会员 | 搜索 | 上传 | 帮助 »
中国DOS联盟论坛 » 其它操作系统综合讨论区 » 用DOS命令如何给本地连接添加服务?
作者:
标题: 用DOS命令如何给本地连接添加服务? 上一主题 | 下一主题
secowu
初级用户





积分 201
发帖 92
注册 2005-12-28
状态 离线
『楼 主』:  用DOS命令如何给本地连接添加服务?

问题,我有个服务inf文件,通过右键无法安装

但,通过,右键本地连接,添加服务的方式却可以正确安装

现在,我想用DOS命令来解决这个问题,但用下面的代码却提示错误

请问大师,怎么解决啊?
以下是inf的内容
;-------------------------------------------------------------------------
; netbridge.inf -- VMnet Bridge Protocol Driver
;
; Copyright (c) 1993-1999, Microsoft Corporation
; Copyright 1999-2007 VMware, Inc.  All rights reserved.
;-------------------------------------------------------------------------
[Version]
Signature   = "$Windows NT$"
Class       = NetService
ClassGUID   = {4D36E974-E325-11CE-BFC1-08002BE10318}
Provider    = %CompanyName%
DriverVer   = 01/26/2007,4.0.1.0
CatalogFile = vmnetbridge.cat

[Manufacturer]
%CompanyName% = VMware, NTx86, NTia64, NTamd64

; Windows 2000
[VMware]
%VMware_Desc% = VMnetBridge.Install, vmware_bridge

; Windows XP and later
[VMware.NTx86]
%VMware_Desc% = VMnetBridge.Install, vmware_bridge

; 64-bit Windows
[VMware.NTamd64]
%VMware_Desc% = VMnetBridge.Install, vmware_bridge

; Itanium-based systems (not supported)
[VMware.NTia64]

;-------------------------------------------------------------------------
; Installation Section
;-------------------------------------------------------------------------
[VMnetBridge.Install]
AddReg=VMnetBridge.Ndi
Characteristics = 0x4080 ; NCF_NDIS_PROTOCOL
CopyFiles       = VMnetBridge.CopyFiles.Init, VMnetBridge.CopyFiles.Sys

; ------------------------------------------------------------------------
; File copy
; ------------------------------------------------------------------------
[SourceDisksNames]
1=%DiskDescription%,"",,

[SourceDisksFiles]
vmnet.sys=1
vmnetbridge.dll=1
vmnetbridge.sys=1

[DestinationDirs]
DefaultDestDir = 12
VMnetBridge.CopyFiles.Init  = 11   ; %windir%\System32
VMnetBridge.CopyFiles.Sys   = 12   ; %windir%\System32\drivers

; Copying of vmnetbridge.dll
[VMnetBridge.CopyFiles.Init]
vmnetbridge.dll,,,2

[VMnetBridge.CopyFiles.Sys]
vmnet.sys,,,2
vmnetbridge.sys,,,2

;-------------------------------------------------------------------------
; Ndi installation support
;-------------------------------------------------------------------------
[VMnetBridge.Ndi]
HKR,Ndi,Service,,VMnetBridge
HKR,Ndi,HelpText,,%VMware_HelpText%
HKR, Ndi\Interfaces, UpperRange,, noupper
HKR, Ndi\Interfaces, LowerRange,,"ndis5,ndis4"

;-------------------------------------------------------------------------
; Keys required if a Notify object is present
;-------------------------------------------------------------------------
HKR, Ndi, ClsID,        , {3d09c1ca-2bcc-40b7-b9bb-3f3ec143a87b}
HKR, Ndi, ComponentDll, , vmnetbridge.dll

;-------------------------------------------------------------------------
; Service installation support
;-------------------------------------------------------------------------
[VMnetBridge.Install.Services]
AddService=VMnetBridge,2,VMnetBridge.Service, VMnetBridge.EventLog

[VMnetBridge.Service]
DisplayName     = %VMware_Desc%
ServiceType     = 1 ;SERVICE_KERNEL_DRIVER
StartType       = 2 ;SERVICE_AUTO_START
ErrorControl    = 1 ;SERVICE_ERROR_NORMAL
ServiceBinary   = %12%\vmnetbridge.sys
LoadOrderGroup  = "PNP_TDI"
AddReg          = VMnetBridge.Service.Reg
Description     = %VMware_Desc%

[VMnetBridge.Service.Reg]
HKLM,"System\CurrentControlSet\Services\VMnetBridge","TextModeFlags",%REG_DWORD%,0x0001
; Don't delete -- edward
HKR,"Parameters\Adapters","Test",%REG_DWORD%,0

[VMnetBridge.EventLog]
AddReg = VMnetBridge.EventLog.Reg

[VMnetBridge.EventLog.Reg]
HKR,,EventMessageFile,0x00020000,"%11%\IoLogMsg.dll;%12%\vmnetbridge.sys"
HKR,,TypesSupported,0x00010001,7


;-------------------------------------------------------------------------
; Support for removal of static registry settings
;-------------------------------------------------------------------------
[VMnetBridge.Install.Remove]
DelReg=VMnetBridge.Static.Reg

[VMnetBridge.Install.Remove.Services]
DelService=VMnetBridge

[VMnetBridge.Static.Reg]
HKLM,"System\CurrentControlSet\Services\VMnetBridge","TextModeFlags"

;-------------------------------------------------------------------------
; String definitions
;-------------------------------------------------------------------------
[Strings]
CompanyName = "VMware, Inc."
VMware_Desc = "VMware Bridge Protocol"
VMware_HelpText = "Gives virtual machines access to physical networks."
DiskDescription = "VMware install disk"
REG_DWORD = 0x10001
使用的安装代码是:
"%cd%\netcfg.exe" -l "%cd%\netbridge.inf" -c s -i vmware_bridge


2007-10-24 13:28
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: