Execute Function Help

I have looked at the very few examples using the ‘execute’ function. I finally successfully written several handy SNMP based functions to display oid values in device labels.

After many hours of attempts to get execute to run a simple windows program, as shown in several builtin tools like the ‘Telnet’ tool which indicates it is an ‘Execute’ type tool, I thought I could replicate the syntax and execute a program.

It appears that I can create a ‘Function’ that uses ‘Execute’. I have come to this conclusion because I can finally get it to at least return a ‘-1’ error return code to the device label rather that getting 'parse failed" or other esoteric errors. How about a way to test the function…

Beyond that, no matter what I put in the parameter string, command only, or command with parameters, everthing returns ‘-1’. Since I am not a RouterOS scripter (which would probably help), I am at a loss as to what this ‘execute’ function wants passed to it.

I am trying to execute ‘arp -a xx.xx.xx.xx’ to determine the MAC of an IP address. I have used every permutation of this syntax, including using .exe, quotes, all the required parameters, to no avail.

I know thats not the only way to get the MAC, but still would like to see the result of the command in the ‘standard output’ array element of the execute function.

Anybody, anywhere have any examples or reference to where I could at least RTFM or look at some working code?

Thanks in advance…SZ