Skip to content

Commit dff180d

Browse files
authored
Improved detection (guessing) of x64 driver files
1 parent f8d2e23 commit dff180d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

amdocl.bat

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,16 @@ for /r %%f in (amdocl*dll) do (
120120
if "%%~nxf"=="%%A" (
121121
echo Found: !FILE!
122122

123-
set FILE_BIT=!FILE:~-7,-5!
124-
125-
if !FILE_BIT! == 64 (
123+
echo !FILE! | findstr /C:"_amd64_" >nul
124+
if !ERRORLEVEL! == 0 (
126125
set "ROOTKEY=!ROOTKEY64!"
127126
) else (
128-
set "ROOTKEY=!ROOTKEY32!"
127+
set FILE_BIT=!FILE:~-7,-5!
128+
if !FILE_BIT! == 64 (
129+
set "ROOTKEY=!ROOTKEY64!"
130+
) else (
131+
set "ROOTKEY=!ROOTKEY32!"
132+
)
129133
)
130134

131135
reg query !ROOTKEY! >nul 2>&1

0 commit comments

Comments
 (0)