Skip to content

Commit

Permalink
Improved detection (guessing) of x64 driver files
Browse files Browse the repository at this point in the history
  • Loading branch information
ptrumpis authored Nov 3, 2023
1 parent f8d2e23 commit dff180d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions amdocl.bat
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,16 @@ for /r %%f in (amdocl*dll) do (
if "%%~nxf"=="%%A" (
echo Found: !FILE!

set FILE_BIT=!FILE:~-7,-5!

if !FILE_BIT! == 64 (
echo !FILE! | findstr /C:"_amd64_" >nul
if !ERRORLEVEL! == 0 (
set "ROOTKEY=!ROOTKEY64!"
) else (
set "ROOTKEY=!ROOTKEY32!"
set FILE_BIT=!FILE:~-7,-5!
if !FILE_BIT! == 64 (
set "ROOTKEY=!ROOTKEY64!"
) else (
set "ROOTKEY=!ROOTKEY32!"
)
)

reg query !ROOTKEY! >nul 2>&1
Expand Down

0 comments on commit dff180d

Please sign in to comment.