On Fri, 20 Mar 2026 10:03:02 +0100 Michał Dec via Freedos-user <[email protected]> wrote:
> By the way appreciate the sense of humor. Didn't catch it at first. I > checked %COMSPEC% - on Live media it points to D:\COMMAND.COM. The file > isn't there, but executing it anyway, launches the default shell anew - wow. > > How does that work? That's odd indeed! There's no magic in my code. Booting my old laptop from USB with the FreeDOS T2603 image, the USB drive is C: and my FreeDOS partition is D:. Checking COMSPEC: D:\CODE\SUDO>set compsec C:\FREEDOS\BIN\COMMAND.COM D:\CODE\SUDO>sudo echo Hello, World! Hello, World! Then if I purposefully set COMSPEC to something else: D:\CODE\SUDO>set comspec=c:\foobar.com D:\CODE\SUDO>sudo echo Hello, World! File or directory not found. That's what I'd expect. (On Windows 2000 in DOS emulation this is different, btw. It seems to override COMSPEC on every invocation, no matter what you set in your environment.) Sijmen _______________________________________________ Freedos-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freedos-user
