Skip to content

Commit

Permalink
tools: mkcat: fix path to inf2cat tool
Browse files Browse the repository at this point in the history
  • Loading branch information
billziss-gh committed Dec 22, 2020
1 parent b148d13 commit 55c53bc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tools/mkcat.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ cd %BaseDir%
if errorlevel 1 goto fail

call %vcvarsall% x64
set RegKey="HKLM\SOFTWARE\Microsoft\Windows Kits\Installed Roots"
set RegVal="KitsRoot10"
reg query %RegKey% /v %RegVal% >nul 2>&1 || (echo Cannot find Windows Kit >&2 & exit /b 1)
for /f "tokens=2,*" %%i in ('reg query %RegKey% /v %RegVal% ^| findstr %RegVal%') do (
set KitRoot="%%j"
)

set TempDir=%TMP%\mkcat-%RANDOM%
if exist %TempDir% rmdir /s/q %TempDir%
Expand All @@ -36,7 +42,7 @@ if not "%1"=="" (
goto copyloop
)
echo inf2cat /driver:%TempDir% /os:%OsVer% /uselocaltime
inf2cat /driver:%TempDir% /os:%OsVer% /uselocaltime
%KitRoot%\bin\x86\inf2cat /driver:%TempDir% /os:%OsVer% /uselocaltime
if errorlevel 1 goto fail
if not "%CertFile%"=="" (
for /F "delims=" %%l in ('certutil -dump "%CertFile%" ^| findstr /I /C:"Cert Hash(sha1)"') do (
Expand Down

0 comments on commit 55c53bc

Please sign in to comment.