On Sun, May 4, 2025 at 6:07 PM Everaldo Bernardo Cunha via
Freedos-devel <freedos-devel@lists.sourceforge.net> wrote:
>
>
>
> Hello!
>
> I used a lot the command "Invoke" in the FreeDOS 1.3, but now in the
> FreeDOS 1.4, the same doesn't exist! How do I do to install it?

The INVOKE command just runs a program and then returns the exit code
(aka the "error level"). It can do a few other things, but that's the
main function of INVOKE. If you don't need the other features (like
redirecting stderr to stdout) you can do the same thing if you just
run a command then "echo" the ERRORLEVEL variable:

ECHO %ERRORLEVEL%


For example:

D:\TEMP>invoke CHOICE
Invoking:  CHOICE
[Y,N]?Y
Returning: 1


or:

D:\TEMP>CHOICE
[Y,N]?Y
D:\TEMP>echo %ERRORLEVEL%
1


For reference, the full usage of INVOKE:

>D:\TEMP\DOSUTILS>invoke /?
>
> INVOKE 1.1 by Jürgen Hoffmann (2010) j_h...@hrz1.hrz.tu-darmstadt.de
>
> usage:  invoke [ options ] <program> [ arguments for program ]
>
>  valid options are:
>     /D       discard stderr
>     /P       propagate result
>     /Q       quiet operation
>     /R       re-direct stderr into stdout
>     /H /?    print this helptext


_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to