First of all, we should note that this is not something you should do as a matter of course on a busy site! It is quite expensive to make the round trip from the ASP engine out to a separate process (which is, after all, what an "executable program" is, no matter how it is invoked) and back. More expensive, for example, than making a database query from a remote server (because database connections were designed to be used by many threads at once, unlike the typical executable).
Having said that...
Server Objects, one of the first suppliers of third-party components for ASP, offers a free component, called AspExec, that indeed allows you to call command line type executables from ASP. Check it out here!
ALSO: You can do this with a Microsoft-supplied component, "WScript.WShell". To see an example that invokes "ping" from ASP, check this out.
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.