Skip to content

Commit 55c53bc

Browse files
committed
tools: mkcat: fix path to inf2cat tool
1 parent b148d13 commit 55c53bc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tools/mkcat.bat

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ cd %BaseDir%
2424
if errorlevel 1 goto fail
2525

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

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

0 commit comments

Comments
 (0)