使用BAT文件编译驱动

具体讨论参考 OSR Online的“Using ".bat" file to build driver ”。[没有固定连接,Google搜索得到]

根据讨论内容,自己整理的:

@echo off
@set PROJDIR=C:\Users\Leyond\Desktop\first
@if not exist "%WDKPATH%\bin\setenv.bat" set WDKPATH=C:\WinDDK\7600.16385.0
@echo on
 cmd /c "%WDKPATH%\bin\setenv.bat %WDKPATH% chk x86 win7 && CD %PROJDIR% && build/ceZ"
@if %ERRORLEVEL% neq 0 goto builderror
@goto done
   
:missingfiles

@if not exist "%WDKPATH%\bin\setenv.bat" (
   echo ** Unable to find the path to the WDK          ** 
   echo ** Please set the WDKPATH environment variable **
 ) else if not exist "%WIX%bin\candle.exe" (
  echo ** Unable to find the Windows Installer XML    **
  echo ** Please set the WIX environment variable     **
 )
 goto done
 
:builderror
@echo The build failed.
pause
:done
pause
 

 

本人不是很懂 命令,有个疑问就是无论编译是否成功,都要停下来显示编译信息,添加pause,效果上能搞定,语法啥的正确吗?..

你可能感兴趣的:(驱动开发)