have a look at checksmbclient() within files_external.
````which```` is used to determine if the program exists