From c50c478113584b4613d91d6aff5ea04542e5fae0 Mon Sep 17 00:00:00 2001 From: Waldi Ravens Date: Wed, 29 May 2019 05:16:56 +0200 Subject: [PATCH] [build.bat] Avoid I/O pipe When invoked from powershell with console code page 65001 piping output from REG to FIND will fail (as will other Microsoft Unicode code pages). --- build.bat | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.bat b/build.bat index 2cca4ae2a..971867298 100644 --- a/build.bat +++ b/build.bat @@ -209,8 +209,8 @@ FOR %%G IN (7za.exe) DO (SET "SEVENZIP_PATH=%%~$PATH:G") IF EXIST "%SEVENZIP_PATH%" (SET "SEVENZIP=%SEVENZIP_PATH%" & EXIT /B) FOR /F "tokens=2*" %%A IN ( - 'REG QUERY "HKLM\SOFTWARE\7-Zip" /v "Path" 2^>NUL ^| FIND "REG_SZ" ^|^| - REG QUERY "HKLM\SOFTWARE\Wow6432Node\7-Zip" /v "Path" 2^>NUL ^| FIND "REG_SZ"') DO SET "SEVENZIP=%%B\7z.exe" + 'REG QUERY "HKLM\SOFTWARE\7-Zip" /v "Path" 2^>NUL ^|^| + REG QUERY "HKLM\SOFTWARE\Wow6432Node\7-Zip" /v "Path" 2^>NUL') DO IF "%%A" == "REG_SZ" SET "SEVENZIP=%%B\7z.exe" EXIT /B @@ -219,6 +219,6 @@ FOR %%G IN (ISCC.exe) DO (SET "INNOSETUP_PATH=%%~$PATH:G") IF EXIST "%INNOSETUP_PATH%" (SET "INNOSETUP=%INNOSETUP_PATH%" & EXIT /B) FOR /F "tokens=5*" %%A IN ( - 'REG QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup 5_is1" /v "Inno Setup: App Path" 2^>NUL ^| FIND "REG_SZ" ^|^| - REG QUERY "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup 5_is1" /v "Inno Setup: App Path" 2^>NUL ^| FIND "REG_SZ"') DO SET "INNOSETUP=%%B\ISCC.exe" + 'REG QUERY "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup 5_is1" /v "Inno Setup: App Path" 2^>NUL ^|^| + REG QUERY "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Inno Setup 5_is1" /v "Inno Setup: App Path" 2^>NUL') DO IF "%%A" == "REG_SZ" SET "INNOSETUP=%%B\ISCC.exe" EXIT /B