Rewtor:

You can use ver and dir from exec.dll, but in the new version you have to specify -c. These commands are not "programs", but shell commands of cmd.exe. You can exec them with:

Code:
/exec cmd /c ver


or the new shorthand form for creating a cmd shell:

Code:
/exec -co ver


I removed the forced running of cmd /c for all commands from exec.dll because it was unnecessary and confusing to launch programs within cmd.exe. If you did not need it, you could not opt out. An opt-in system works better, so if you need special shell style support, you can use cmd directly as shown above. This includes commands that have piping (command1 | command2) or shell redirection (command1 > outfile.txt). You would include -c for those. In short, /exec should have the same behaviour as the familiar /run, now, which should make things more intuitive.

In older versions of exec.dll the -c is not necessary. Note that I have a version of the mrc script that removes the need for putting -o with -c, I will update the release with this script soon.

As far as asynchronous identifiers go, this doesn't really make sense in the context of mIRC. An $identifier will by definition return immediately, and cannot be asynchronous-- or at least, any result that $exec would give would be of little use. This is why /exec is recommended. That said, /exec and $exec are just wrappers for /dll and $dll (and $dllcall). If you really need an asynchronous call via identifier, you can write your own alias that uses $dllcall($exec.dll, execA, ...) (you can check the exact syntax in the mrc file). But perhaps you can explain what you're trying to do and I can let you know of a better way to do it.

edit: I've just updated exec.dll to 1.11, and -o is no longer required with -c. You can now just use /exec -c ver. To hide output, use -k noop or /.exec.

Last edited by argv0; 23/02/11 08:45 PM.

- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"