Question
Yakov Berger · Aug 17

$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

Product version: IRIS 2020.1
00
3 0 4 229
Log in or sign up to continue

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

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.cls...

The InterSystems WRC can also help if you are truly stuck.