$ZF(-100) to run Windows batch file (*.bat)
Hi,
i am trying to run a windows batch file using $ZF(-100)
$ZF(-100,"/ASYNC /LOGCMD","C:\batch_files\ab_bat.bat")
doesn't seem to be working (no error just the batch files contents no executed).
should this work?
Thanks
Comments
try to check the conditions / privileges / user..... using CPIPE first.
example: Execute Server Commands from Caché / Ensemble / IRIS
Should work. What does this function returns? Does it work if you put something very simple in the bat file? E.g.
echo qq > c:\temp\test.txt
See documentation: $ZF(-100) requires the %System_Callout:U privilege. And check "Error Handling".
It should work. Windows privileges need to be correct, and in recent Windows versions, it is not as simple as running as an Administrator. If you have specified a user to run the IRIS instance, rather than the Local System account, run the irisinstall setserviceusername command (details are in the documentation) to set privileges correctly.
https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cl…
The InterSystems WRC can also help if you are truly stuck.