Permalink
Browse files

Use find.exe from system32 specifically. Fixes #2

  • Loading branch information...
1 parent b34afe8 commit 3478b1bcd8df7a96a5c306f09bde984ab789f97e @grompe committed May 28, 2016
Showing with 5 additions and 5 deletions.
  1. +3 −3 checkdll.bat
  2. +1 −1 checklid.bat
  3. +1 −1 install.bat
View
@@ -8,12 +8,12 @@ set target=kbdusru_undead.dll
if not exist %target% goto:notexist
set d=################################
echo %d%%d%%d%%d%%d%%d%%d%%d%>__dummy__.txt
-for /f "tokens=3" %%i in ('fc /b __dummy__.txt %target% ^| find "003C:"') do set pe=%%i
-for /f "tokens=3" %%i in ('fc /b __dummy__.txt %target% ^| find "00%pe%:"') do set sig=%%i
+for /f "tokens=3" %%i in ('fc /b __dummy__.txt %target% ^| %windir%\system32\find "003C:"') do set pe=%%i
+for /f "tokens=3" %%i in ('fc /b __dummy__.txt %target% ^| %windir%\system32\find "00%pe%:"') do set sig=%%i
if not %sig%==50 goto:notvalid
set /a h=0x%pe%+4
call:tohex %h%
-for /f "tokens=3" %%i in ('fc /b __dummy__.txt %target% ^| find "00%hex%:"') do set arch=%%i
+for /f "tokens=3" %%i in ('fc /b __dummy__.txt %target% ^| %windir%\system32\find "00%hex%:"') do set arch=%%i
if %processor_architecture%==x86 goto:x86
if %processor_architecture%==AMD64 goto:amd64
del __dummy__.txt
View
@@ -4,7 +4,7 @@ if "%1"=="" (
exit /b 2
)
for /F "tokens=*" %%i in ('reg query "HKLM\SYSTEM\CurrentControlSet\Control\Keyboard Layouts"') do (
- for /F "tokens=4" %%j in ('reg query "%%i" /v "Layout Id" 2^>nul ^| find "Layout Id"') do (
+ for /F "tokens=4" %%j in ('reg query "%%i" /v "Layout Id" 2^>nul ^| %windir%\system32\find "Layout Id"') do (
if /I %%j==%1 (
echo Layout Id %1 already exists!
exit /b 1
View
@@ -32,7 +32,7 @@ goto:eof
:yes
copy %target% %windir%\system32\ >nul 2>&1
if errorlevel 1 goto:cannotcopy
-for /f %%i in ('ver ^| find "Version 5"') do set nt5=yes
+for /f %%i in ('ver ^| %windir%\system32\find "Version 5"') do set nt5=yes
if not exist %windir%\system32\reg.exe goto:manualreg
set key="HKLM\SYSTEM\CurrentControlSet\Control\Keyboard Layouts\%id%"
reg add %key% /f >nul 2>&1

0 comments on commit 3478b1b

Please sign in to comment.