Your available line will always return true, -1 is not null.
^^^^ is not exactly correct... First the available line is only used when using "discover" to automatically add a probe to a device. The dude attempts to use the available line of the probe on the device when you click discover on the services tab of that device and the probe is configured to be allowed on that device type. These controls are in the device types.
Let me elaborate, the if statement is such that when true it returns the 2nd parameter if false returns the 3rd parameter
if (x, 1, -1) When the dude evaluates x it will return 1 when true and -1 when false BUT the dude will find -1 as a number and not null and therefore decide that this probe is "Available" to be used.
In the case of your available line "if (execute("c:\temp\myFlag.exe")>0, 0, -1)" execute is exiting with a -1 not the if since the parameters are incorrect, c:\\temp\\myFlag.exe, might work, and if it returned the port number, the 0 in the 2nd parameter would be returned. BUT Since it always fails it returns -1 the dude assumes that the probe worked and can be installed on this device. You could just put 1 on the available line.
Since you manually installed the probe it only uses the function built on the Error line. The code on the error line has the wrong parameters for execute, the return is -1 every time. Maybe this will work; if (execute("c:\\temp\\myFlag.exe")>0, "", "port is not open") or; if(execute(myFlag.exe,,c:\\temp)>0,"","Port is not open").
The bigger problem is you have 3 places you have values returned and what they should be must tracked and presented to the next step in the probe to get the value evaluated correctly. Those 3 places are the error line, the if statement and the execute statement. Ideally the execute statement just returns 1 when the port is open. then the return code is either 1, 0, or -1. The if statement needs to make sure the value is >0 so that negative number is false, then the error can be evaluated as "" = UP or "anything"=Down.
Also you could use an array index to return the element you are interested in if you want the actual number.
yuk too many words... sorry.