Showing results for Tips/Support - The Old New Thing

May 18, 2006
Post comments count0
Post likes count0

The redirection operator can occur in the middle of the command line

Raymond Chen
Raymond Chen

Although the redirection operator traditionally appears at the end of a command line, there is no requirement that it do so. All of these commands are equivalent: All of them echo "A B" to the file "C". You can use this trick to avoid the redirection problem we discussed last time. We saw that writing inadvertently interprets the "2" as p...

Tips/Support
May 17, 2006
Post comments count0
Post likes count0

Beware of digits before the redirection operator

Raymond Chen
Raymond Chen

If you want to put the string "Meet at 2" into the file "schedule", you might be tempted to use If you try this, however, you'll see the string "Meet at" on the screen and the "schedule" file will be blank. [Typo fixed, 10am] What happened? A digit immediately before a redirection operator modifies which stream the redirection operator appl...

Tips/Support
May 16, 2006
Post comments count0
Post likes count0

Command line redirection is performed by the command line interpreter

Raymond Chen
Raymond Chen

The magic characters like <, >, and | in command lines like are interpreted by the command interpreter ; they aren't built into the function. (This is obvious if you think about it. That command line created two processes; which one should return a handle to?) If you pass a command line like this to , it will merely run the program w...

Tips/Support
May 4, 2006
Post comments count0
Post likes count2

Doing quick arithmetic from the command prompt

Raymond Chen
Raymond Chen

The command processor comes with a mini-calculator that can perform simple arithmetic on 32-bit signed integers: Note that we had to quote the shift operator since it would otherwise be misinterpreted as a "redirect stdout and append" operator. For more information, type at the command prompt.

Tips/Support
Mar 6, 2006
Post comments count0
Post likes count0

The ForceAutoLogon setting doesn't do what most people think

Raymond Chen
Raymond Chen

The folks on the logon team wish me to remind you that the ForceAutoLogon setting does more than just log on an account automatically. They've had to deal with large numbers of people who set the key without really understanding what it does, and then getting into trouble because what they get is not what they expected. In addition to logging on ...

Tips/Support
Jan 13, 2006
Post comments count0
Post likes count0

Why do words beginning with "home" get treated as URLs?

Raymond Chen
Raymond Chen

Vitaly from the Suggestion Box asked (with grammatical editing), Could you explain why Windows starts the web browser if the file name passed to ShellExecute starts with "home". First thing to note is that this URL-ization happens only after the function has tried all the other possible interpretations. If a file named "homestar" is found in ...

Tips/Support
Oct 17, 2005
Post comments count0
Post likes count0

The undeletable Outlook folder

Raymond Chen
Raymond Chen

For a while, I've had a few "undeletable Outlook folders". Even after deleting all the messages from them, Outlook just complains when I try to delete them. There was some sort of error message, but of course I didn't read it. The only option was OK, so I clicked it. As I recall, the message said something about "Can't delete because blah blah pe...

Tips/Support
Sep 6, 2005
Post comments count0
Post likes count0

Windows Server 2003 can take you back in time

Raymond Chen
Raymond Chen

If you are running Windows Server 2003, you owe it to yourself to enable the Volume Shadow Copy service. What this service does is periodically (according to a schedule you set) capture a snapshot of the files you specify so they can be recovered later. The copies are lazy: If a file doesn't change between snapshots, a new copy isn't made. Up to 6...

Tips/Support
Jun 20, 2005
Post comments count0
Post likes count0

What's the difference between autocomplete and dropdown history?

Raymond Chen
Raymond Chen

One shows things that might be, the other shows things that were. Both of them try to help you type something, but they operate differently (and look confusingly similar). Let's take the second case first. Dropdown history, like you see in the Run dialog, common file dialogs, and the Internet Explorer address bar. The cue for dropdown history is a...

Tips/Support
Jun 16, 2005
Post comments count0
Post likes count0

What is the difference between "Unpin from Start menu" and "Remove from this list"?

Raymond Chen
Raymond Chen

The list of programs on the left hand side of the Start menu is really two lists. (You can see the separator line between them.) The top list is the so-called "pin list". This is the list of programs you picked to be "locked" to the top of the Start menu. You can "pin" a program by right-clicking it and selecting "Pin to Start menu", or you can j...

Tips/Support