Hi ,
I am tryin to use pub.utils:executeOSCommand service in wM IS 9.9, for running windows commond. But I am getting error as Invalid argument.
command :findstr /I /M /S “Arsenal” fullyQualifiedPathOfpackageLocation
PFB service inputs I am giving
command:findstr
arguments: /I
/M
/S
“Arsenal”
environment: null
workingDirectory:fullyQualifiedPathOfpackageLocation
yes I’m trying to search particuler string via windows command.
yes I tried that command on cmd box it is working fine and giving me correct results.
can you please help how to use arguments for that service.
Under the above folder, I have a file called “proposal.txt” which contains “Windows I am ready” and the same file is present in subfolders
When you run the service with below inputs, it will list the expected output. Correct me if there is any issues.
command findstr
workingDirectory C:/Users/Mahesh/Desktop/temp
arguments[0] /m
… /i
… /s
… Windows
… file name or . To search every file in the current directory and all subdirectories that contained the word Windows,
thank you @RMG and
Special thanks to @Mahesh taking time and trying at your end.
Yes I eqarlier tried with same way the way you have mention I gain retired it but everytime I am getting below error .
Could not run ‘executeOSCommand’
com.wm.app.b2b.server.ServiceException: [ISS.0086.9279] Specified working directory [\Server\c$\SoftwareAG_99\IntegrationServer\instances\default\path] is not on the allowedWorkingDirectories list in the OSCommands.cnf file
after making changes in configFile I reloaded pacakge several times.
It worked for me when I specified path as \server\c$\SoftwareAG_99\IntegrationServer\instances\default\path\
problem with it is it gaves error as INDSTR: Cannot open and FINDSTR: Out of memory
SOLUTION that I have applied as of now I wrote java service to execute command and it is giving me correct results. But it is taking more than 2 min. to fetch the results.
java code is very simple with the use of process = (Runtime.getRuntime()).exec(Command);
It would be very helpful if you give your views on executing command quickly in permisiable time.