How to Run a .exe in background???
I have seen in my previous company that Omnipage (OCR Engine) supports its .exe should take parameters and gives the output from comman line.At that time the configuration was done by some other guy..he wrote code like this
// Step 4: OCR each image file and generate a text file
def recType = 'OCR'
def omrResult = ''
if (recType == 'OMR') {
ant.exec(executable:'cmd.exe',outputproperty : omrResult)
{
arg(line:"/c C:\\Progra~1\\ScanSoft\\OPCaptureSDK12\\Distributi on\\opo.exe " + tmpDirPath)
}
}
else {
ant.exec(executable:'cmd.exe') {
arg(line:"/c C:\\Progra~1\\ScanSoft\\OPCaptureSDK12\\Distributi on\\op.exe " + tmpDirPath)
}
}
//here tmpDirPath is the path of the .tif files
I asked him his response was:
Take args from command line to execute the omni page as follows
C:\\Progra~1\\ScanSoft\\OPCaptureSDK12\\Distributi on\\opo.exe
use exec Runtime class to execute omni page.
I am not getting thiswhen i do it is opening in .GUI mode..
This is very urgent requirement for me...please Help..thanks