Showing tag results for Tips/Support

Aug 25, 2011
Post comments count0
Post likes count1

Stupid command-line trick: Counting the number of lines in stdin

Raymond Chen

On unix, you can use to count the number of lines in stdin. Windows doesn't come with , but there's a sneaky way to count the number of lines anyway: It is a special quirk of the command that the null string is treated as never matching. The flag reverses the sense of the test, so now it matches everything. And the flag returns the count. ...

CodeTips/Support
Aug 23, 2011
Post comments count0
Post likes count1

Why doesn't the Open Files list in the Shared Folders snap-in show all my open files?

Raymond Chen

A customer wanted a way to determine which users were using specific files on their server. They fired up the Shared Folders MMC snap-in and went to the Open Files list. They found that the results were inconsistent. Some file types like and did show up in the list when they were open, but other file types like did not. The customer asked for a...

Tips/Support
Aug 17, 2011
Post comments count0
Post likes count1

Starting up inside the box

Raymond Chen

the shell team received two customer questions about a month apart which seemed unrelated but had the same root cause. I found that in Windows Vista, the command is ten times slower than it was in Windows XP. What is the source of this slowdown, and how can I fix it? We have an application which takes a very long time to start up on Window...

Tips/Support
Aug 16, 2011
Post comments count0
Post likes count1

Why does creating a shortcut to a file change its last-modified time… sometimes?

Raymond Chen

A customer observed that sometimes, the last-modified timestamp on a file would change even though nobody modified the file, or at least consciously took any steps to modify the file. In particular, they found that simply double-clicking the file in Explorer was enough to trigger the file modification. It took a while to puzzle out, but here's wha...

Tips/Support
Aug 9, 2011
Post comments count0
Post likes count1

Why does the Shift+F10 menu differ from the right-click menu?

Raymond Chen

The Shift+F10 key is a keyboard shortcut for calling up the context menu on the selected item. but if you look closely, you might discover that the right-click menu and the Shift+F10 menu differ in subtle ways. Shouldn't they be the same? After all, that's the point of being a keyboard shortcut, right? Let's set aside the possibility that a progr...

Tips/Support
Aug 2, 2011
Post comments count0
Post likes count1

An even easier way to get Windows Media Player to single-step a video

Raymond Chen

Since my original article explaining how to get Windows Media Player to single-step a video, I've learned that there's an even easier way. Backward-stepping is dependent upon the codec; some of them will go backward to the previous keyframe. The person who tipped me off to this feature: The developer who implemented it. Remember: Sharing a ti...

Tips/Support
Jun 22, 2011
Post comments count0
Post likes count1

How do I compress files (via NTFS compression) from the command line?

Raymond Chen

A customer wanted to know whether there was a way to compress files and directories (in the sense of NTFS compression) from a script or from the command line. They knew about the Properties dialog, but they wanted something scriptable. The command-line tool for this is . Type for usage information. The customer liaison was grateful for this info...

Tips/Support
Jun 21, 2011
Post comments count0
Post likes count1

How to get Windows Media Player to single-step a video

Raymond Chen

I always forget how to do this, so I'm going to write it down so I can look it up later. When a video is playing, right-click the volume control slider and select Enhancements, then Play speed settings. (Actually, it also works if you right-click the speaker icon, the Stop button, the Replay button, or the Shuffle button, but the volume control sl...

Tips/Support
Jun 6, 2011
Post comments count0
Post likes count1

Why do Group Policy settings require me to have a degree in philosophy?

Raymond Chen

Commenter Josh points out that Group Policy settings often employ double-negatives (and what's the difference between turning something off and not configuring it)? Group Policy settings are unusual in that they are there to modify behavior that would continue to exist without them. They aren't part of the behavior but rather a follow-on. Suppose...

Tips/Support
May 17, 2011
Post comments count0
Post likes count1

Why does Explorer show a thumbnail for my image that's different from the image?

Raymond Chen

A customer (via a customer liaison) reported that Explorer somestimes showed a thumbnail for an image file that didn't exactly match the image itself. I have an image that consists of a collage of other images. When I switch Explorer to Extra Large Icons mode, the thumbnail is a miniature representation of the image file. But in Large Icons and M...

Tips/Support