Hi Mateusz, >> What do you think? Would it be hard to implement >> "command > file 2>&1 -- Redirect errors and output to one file"? >> (https://ss64.com/nt/syntax-redirection.html) > > The parsing would be definitely more complex.
Of course, but hey, it's written in C not assembler. ;-) >> Would it break compatibility with MS-DOS anywhere? > > Certainly, as the behaviour would - by definition - be different. Is > there an existing program or script that could fail because of that, > this I don't know. > > I think an easier way is to make SvarCOM output DOS errors to stdout in > some configurable way. Will think about that. An easier way too, because I already have a working version, is a TSR that hooks DOS function 40h (WRITE TO FILE) and everytime it is called with handle to write to is 2, change that to 1. A TSR should not hurt at this stage of the installation, because we reboot after anyway. But if you care, we could use ecm's AMIS skeleton: https://pushbx.org/ecm/web/#projects-tsr I just copied my EIDL source code and modified the interrupt handler. http://www.bttr-software.de/tmp/redir.zip 2TO1 -- Tiny TSR to hook int 21h function 40h. TESTMSG -- Tiny test prog to print to stdout and stderr. TEE2 -- Tiny TEE tool found at https://books.google.de/books?id=E7p19YtI_Z4C&lpg=PA201&ots=XgpJLkK1BU&dq=dos%20tee%20command&hl=de&pg=PA201#v=onepage&q=dos%20tee%20command&f=false I entered the debug script, ran debug, ran resulting .COM file thru IDA disassembler, changed syntax to NASM, assembled with NASM (uses a different instruction encoding). ;-) For the SvarDOS install process, you would need to: 1) Copy 2TO1.COM and TEE2.COM to C:. 2) Change install.c: fd = fopen(buff, "wb"); if (fd == NULL) return(-1); fprintf(fd, "@ECHO OFF\r\n" "SET DOSDIR=C:\\SVARDOS\r\n" "SET NLSPATH=%%DOSDIR%%\\NLS\r\n" "PATH %%DOSDIR%%\\BIN\r\n"); fprintf(fd, "CD TEMP\r\n" "%%COMSPEC%% /C postinst.bat | tee2 %%DOSDIR%%\\install.log\r\n"); fclose(fd); 3) Remove 2TO1.COM and TEE2.COM. Note: This is only a draft version. I didn't test installation by myself. Cheers, Robert -- +++ BTTR Software +++ Home page: https://www.bttr-software.de/ DOS ain't dead: https://www.bttr-software.de/forum/ _______________________________________________ Svardos-users mailing list Svardos-users@lists.osdn.me https://lists.osdn.me/mailman/listinfo/svardos-users