⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 install642.bat

📁 dsp DM642 pci 详细的开发例程
💻 BAT
字号:
:: install642.bat - installs the EVM642 device driver
:://////////////////////////////////////////////////////////////////////////
:://
::// Copyright (c) 2003 Valley Technologies, Inc.
::// All rights reserved.
:://
::// $Header $
:://
::// Original Author: ebersole
::// Most Recent Contributing $Author: ebersole $
:://
:://////////////////////////////////////////////////////////////////////////

:: Don't show each command we run
@echo off

:: Get the parameters into variables
set sInstallDir=%1
set sLogFilename=%s
set sOS=""

:: Figure out which Windows OS we are running
goto determineOS

:CheckForDriver

:: Set the name and path of the Jungo files

set sDriverDir=%SystemRoot%\System32\Drivers
set sInfDir=%SystemRoot%\Inf
set sJungoDir=%sInstallDir%\Host\Etc\Jungo

set sSysFilename=%sDriverDir%\windrvr6.sys
set sInfFilename=%sInfDir%\windrvr6.inf

:: If there is a Jungo file in the System32 Drivers dir
dir %sSysFilename% > nul 2>&1 && goto handleDriverExists

:InstallDriver

:: Install our Jungo driver file(s) ...
if %sOS% == "9x" goto InstallForW9x
if %sOS% == "NT" goto InstallForWNT
if %sOS% == "XP" goto InstallForWXP

goto InstallForW200x

:InstallationFinished

goto :EOF

::#############################################################################

:InstallForW9x

:: If the OS is 98/ME, we need to manually copy the driver files

:: Copy the driver files into the windows system directories
copy %sJungoDir%\windrvr6.sys %sSysFilename% >nul 2>&1
copy %sJungoDir%\windrvr6.inf %sInfFilename% >nul 2>&1

:: Put a remark about it into the log file
@echo windrvr6.sys installation file copied to %sSysFilename% >> %sLogFilename%
@echo windrvr6.inf installation file copied to %sInfFilename% >> %sLogFilename%

wdreg -inf %sJungoDir%\windrvr6.inf install

@echo For Window 9x/ME, you must install the DM642's INF file _manually_,
@echo   using either the Add New Hardware Wizard or the Upgrade Device
@echo   Driver Wizard.
@echo
@echo Press any key to continue ...
@echo

pause

goto InstallationFinished

::#############################################################################

:InstallForWNT

:: If the OS is WNT, we need to manually copy the driver files

:: Copy the driver files into the windows system directories
copy %sJungoDir%\windrvr6.sys %sSysFilename% >nul 2>&1
copy %sJungoDir%\windrvr6.inf %sInfFilename% >nul 2>&1
copy %sJungoDir%\dm642.inf    %sInfDir%\dm642.inf >nul 2>&1

:: Put a remark about it into the log file
@echo windrvr6.sys installation file copied to %sSysFilename%   >> %sLogFilename%
@echo windrvr6.inf installation file copied to %sInfFilename%   >> %sLogFilename%
@echo dm642.inf installation file copied to %sInfDir%\dm642.inf >> %sLogFilename%

wdreg install

goto InstallationFinished

::#############################################################################

:InstallForWXP
:InstallForW200x

wdreg -inf %sJungoDir%\windrvr6.inf install
wdreg -inf %sJungoDir%\dm642.inf    install

goto InstallationFinished

::#############################################################################

:handleDriverExists

    @echo WARNING: A %sSysFilename% file already exists.
    @echo.

    :: Mark in the log file that Jungo already exists
    @echo %sSysFilename% already exists. >> %sLogFilename%

    @echo Enter CTL-C to exit the installation
    @echo Press any other key to continue, and COPY OVER the existing file!

    pause

    @echo Proceeding with removal/replacement of old EVM642 driver...
    @echo

    if %sOS% == "NT" goto removeDriverNT

:removeDriver

    wdreg -inf %sInfFilename% uninstall
    goto END_handleDriverExists

:removeDriverNT

    wdreg uninstall

:END_handleDriverExists

    @echo Errorlevel after wdreg-uninstall is %ERRORLEVEL%
    goto InstallDriver

::#############################################################################

:determineOS

    set sVerFile=%sInstallDir%\OsVer.txt

    ver > %sVerFile%

:checkNT
    find "NT" < %sVerFile% >nul 2>&1
    if errorlevel 1 goto check98

    set sOS="NT"
    goto END_determineOS

:check98
    find "98" < %sVerFile% >nul 2>&1
    if errorlevel 1 goto checkME

    set sOS="9x"
    goto END_determineOS

:checkME
    find "ME" < %sVerFile% >nul 2>&1
    if errorlevel 1 goto check2000

    set sOS="9x"
    goto END_determineOS

:check2000
    find "2000" < %sVerFile% >nul 2>&1
    if errorlevel 1 goto setXP2003

    set sOS="2000"
    goto END_determineOS

:setXP2003
    set sOS="XP"

:END_determineOS

    del %sVerFile%

    @echo Determined that OS is %sOS%

    goto CheckForDriver

::#############################################################################

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -