Oracle batch OPatch.bat.bat not working in TCC but correctly in CMD

Nov 14, 2011
20
0
[0][d:\orant64\18c\opatch]opatch.bat

TCC: D:\Orant64\18c\OPatch\opatch.bat [422] Unknown command "D:\Orant64\18c\OPatch\jre\bin\java.exe -version 2>&1 | findstr /i version"

Instruction is

for /f "tokens=3" %%g in ('"D:\Orant64\18c\OPatch\jre\bin\java.exe -version 2>&1 | findstr /i version"') do (

set JAVAVER=%%g

)

set JAVAVER=%JAVAVER:"=%

With cmd, it works

[0][d:\orant64\18c\opatch]cmd

Microsoft Windows [Version 10.0.14393]

(c) 2016 Microsoft Corporation. All rights reserved.

[0][D:\Orant64\18c\OPatch]test

[0][D:\Orant64\18c\OPatch]for /F "tokens=3" %g in ('"D:\Orant64\18c\OPatch\jre\bin\java.exe -version 2>&1 | findstr /i version"') do (set JAVAVER=%g )

[0][D:\Orant64\18c\OPatch](set JAVAVER="1.8.0_91" )

[0][D:\Orant64\18c\OPatch]set JAVAVER=1.8.0_91

Any idea ?

Thanks.

Marc
 
Does the properties for java.exe show the version? Could use @verinfo[] to get the desired information...
 
Hi, I cannot modfy the script: it is an Oracle script to apply patches to DB.
It runs ok in CMD .EXE but not in TCC.EXE, it's a problem of " '
 

Similar threads