Welcome to MSDN Blogs Sign in | Join | Help

You don't need that 90 byte whereis program any more

Yes, you can write a whereis program in 90 bytes but Windows Server 2003 and Windows Vista both come with a version of WHERE.EXE, so you don't even need the batch file any more.

Published Monday, June 30, 2008 7:00 AM by oldnewthing
Filed under:

Comments

# re: You don't need that 90 byte whereis program any more

Monday, June 30, 2008 12:32 PM by peetm

Neat, but still *far* from my infinitely-profitable program!

http://www.peetm.com/blog/?p=55

# re: You don't need that 90 byte whereis program any more

Monday, June 30, 2008 1:14 PM by David Brooks

It seems that <i>where</i> was written on the cheap too:

C:\> where

ERROR: The operation completed successfully

# re: You don't need that 90 byte whereis program any more

Monday, June 30, 2008 2:58 PM by Nick

And now, thanks to our friend the copy command, so does my XP machine :)

@David

Is that Vista? On Server 2003 I get:

C:\>where

ERROR: Invalid syntax

Type "WHERE /?" for usage help.

# where/Vista SP1

Monday, June 30, 2008 3:17 PM by Maurits

Vista SP1:

>where

ERROR: The operation completed successfully.

Type "WHERE /?" for usage help.

# re: You don't need that 90 byte whereis program any more

Monday, June 30, 2008 6:08 PM by MadQ

Now try

C:\>where where

for enlightenment.

# re: You don't need that 90 byte whereis program any more

Tuesday, July 01, 2008 12:33 AM by Paul Coddington

Perhaps it can answer this age old question that comes up every time someone produces a batch file like the one referred to?

WHERE *secret_batchfile_advanced_syntax_guide*

# re: You don't need that 90 byte whereis program any more

Tuesday, July 01, 2008 4:17 AM by someone

So WHY does all Vista EXEs if run under XP give the "is not a valid Win32 application" error? What is the reason for the behavior? I don't wish to know the technical reason, I want to know did MS design it on purpose so people may not "get" and "use" Vista binaries in XP? Like how one can use msconfig from XP under 2000, did MS deliberately limit such use under XP?

# re: You don't need that 90 byte whereis program any more

Tuesday, July 01, 2008 8:44 AM by alt-92

> I don't wish to know the technical reason

Why not? Because that's the explanation (manifests) - not the conspiracy theory you obviously prefer.

# re: You don't need that 90 byte whereis program any more

Tuesday, July 01, 2008 12:00 PM by another one

[offtopic]

So WHY does all Linux EXEcutables if run under XP give the "*****" error? What is the reason for the behavior? I don't wish to know the technical reason, I want to know did Ubuntu, Redhat, etc. design it on purpose so people may not "get" and "use" Nix binaries in XP? ... did Linux community deliberately limit such use under XP?

[/offtopic]

# re: You don't need that 90 byte whereis program any more

Saturday, July 05, 2008 4:56 PM by Maarten

@Paul Coddington

The syntax for Raymond's batchfile is actually included for a bit. If you run 'for /?' you get a lot of inromation about it :)

New Comments to this post are disabled
 
Page view tracker