虚拟机

源代码在线查看: install.bat

软件大小: 2807 K
上传用户: rickie936
关键词: 虚拟机
下载地址: 免注册下载 普通下载 VIP

相关代码

				@ECHO OFF
				ECHO Microsoft Virtual PC 2007 Network Services Driver Installation
				
				:: ======================================================================
				:: File:		INSTALL.BAT
				:: 
				:: Contains:	This installs the Virtual PC drivers under Windows 2000/XP.
				:: ======================================================================
				
				:: Save the current directory
				PUSHD
				
				:: Is this Windows NT or Windows 2000/XP?
				VER | FIND /I "Windows NT Version 4.0">NUL
				IF NOT ERRORLEVEL 1 GOTO Fatal_WrongSystemVersion
				
				:: Enable command extensions - See HELP SETLOCAL for information on the
				:: following idiom.
				VERIFY OTHER 2>NUL
				SETLOCAL ENABLEEXTENSIONS
				IF ERRORLEVEL 1 GOTO Fatal_UnableToEnableExtensions
				
				:: Setup some common constants
				SET NetInfName=VMNetSrv\VMNetSrv.inf
				
				:: The source directory may be specified in the second batch parameter.
				:: If the source directory is not specified, assume the source directory
				:: is the current directory.
				IF NOT ([%1] == []) CD /D %1
				FOR /F "delims=" %%A IN ('CD') DO SET CurDir=%%A
				
				:: Install the driver
				RUNDLL32 "%CurDir%\InstSrvc.dll",InstallNetworkDriver %CurDir%\%NetInfName%
				
				:: Notify user that install is complete
				ECHO Driver installation is complete...
				
				:: This makes sure we can execute this batch file without pausing at the end.
				IF [%2]==[nopause] GOTO End
				PAUSE
				GOTO End
				
				:Fatal_UnableToEnableExtensions
				ECHO ERROR: Unable to enable command extensions.
				GOTO End
				
				:Fatal_WrongSystemVersion
				ECHO ERROR: This driver may only be installed under Windows 2000 or later
				
				:End
				ENDLOCAL
				
				:: Restore the current directory
				POPD
							

相关资源