I forgot to check this thread yesterday, wow.
I've tried that one that Anonymous Freak posted (it's what Google informed me of after a long search) and it just keeps telling me I've got a syntax error no matter what I do (I've tried using simple commands like "date" or "echo hi" too).
The output of chkcpu /s is a concise string containing the name and speed of the cpu, i.e., "Am486DX4 101mhz", so an errorlevel check won't work (plus I'll likely want to do similar things for other programs at various points in my batch programming life). What I
was doing was redirecting output to a file, reading the file into an environment variable using STRINGS.COM, and then printing it in ECHO, but that took like 5 seconds realtime and I decided it sucked - lol.
Yeah, I was wondering about that. Worth mentioning that this won't work with any 'real' version of DOS, which kind of restricts its use as a universal CPU detector...
I'm just using it to print the currently installed CPU and it's speed in my machine, and I always run DOS 7.10 on machines I'd be interesting in having that print every boot on, so no worries.
Just as a test, btw, I ran the exact line Anonymous Freak wrote and it also produces an ambiguous "Syntax error". I will investigate the tools the others have posted now.
Edit: Dude, holy crap, ECO is fantastic. Do you still have the source for that, Chuck?
Edit 2: I can finally format text how I want... yay... as a programmer I have absolutely no trouble popping \r and \n in where needed, so this is brilliant. It actually reduces the number of commands I need to run because I can insert newlines and/or carriage returns without calling "ECHO" over and over to make new lines.
Example output:
Welcome to MS-DOS 7.10 on the Presario 425.
<sp>This system is powered by the AMD 5x86 134MHz.
C:\>_
(I put <sp> to represent a space as this forum seems to remove leading space in a quote)