# Tips/Support

• #### The undeletable Outlook folder

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 pending synchronization blah blah." I don't know what "pending synchronization" is, but it must be important if Outlook won't let me delete a folder because of it.

Meanwhile, I also noticed that my Sync Issues folder grew by about a dozen error messages every day, and I had to go clean them out every so often. The messages looked something like this:

9:26:59 Synchronizer Version 11.0.6352
9:26:59 Synchronizing Mailbox 'Raymond Chen'
9:26:59 Synchronizing local changes in folder '0618'
9:26:59 Error synchronizing folder
9:26:59		 [80004005-501-4B9-0]
9:26:59		 The client operation failed.
9:26:59		 Microsoft Exchange Server Information Store
9:26:59		 http://www.microsoft.com/support/prodredirect/outlook2000_us.asp?err=80004005-501-4b9-0
9:27:00 Synchronizing local changes in folder '0611'
9:27:00 Error synchronizing folder
9:27:00		 [80004005-501-4B9-0]
9:27:00		 The client operation failed.
9:27:00		 Microsoft Exchange Server Information Store
9:27:00		 http://www.microsoft.com/support/prodredirect/outlook2000_us.asp?err=80004005-501-4b9-0
9:27:01 Done


I clicked the link to obtain further information, but the instructions there didn't solve my problem. I just chalked this up to "Outlook gets that way sometimes," and ignored the messages, since they didn't seem to be hurting me. I had almost resigned myself to carrying these two undeletable folders with me until I die.

Then today I randomly stumbled across the solution.

I right-clicked one of the "stuck" folders and selected "Clear Offline Items", even though there were no offline items in the folder. (I deleted all the messages from it; the folder was empty. How do you clear something that is empty?) I got a warning dialog that said something like, "Hey, there's some unfinished synchronization here, do you want to clear the items anyway?" I said, "Go for it."

And then Outlook let me delete the folder.

My guess is that Outlook's synchronization engine got wedged up on these two folders because there was some unfinished business that it just couldn't reconcile, and it said, "Eh, maybe it'll work tomorrow, but in the meantime, don't delete it yet. I'm still working on it." Repeat for several months, because tomorrow never comes. By telling Outlook, "Oh just give up already, trust me, I don't care any more," the synchronization engine released its objections to deleting the folder and let me finally wipe it out.

If you have a mysteriously undeletable folder, you could try this, see if it helps.

Update: I just hit the problem again. The error message is

Outlook hat die Synchronisierung der lokalen Änderungen an Elementen in diesem Ordner noch nicht abgeschlossen. Der Order kann erst nach Abschluss der Synchronisierung mit dem Server gelöscht werden.

Yes, I run Outlook in German. This translates to "Outlook has not yet completed the synchronization of local changes to items in this folder. The folder can only be deleted after completion of the synchronization with the server."

This time, deleting the offline items wasn't good enough. Even though the Properties dialog says "Server folder contains: 0 items" and "Offline folder contains: 0 items", I nevertheless had to trigger a manual synchronization to reconfirm that zero equals zero before it would let me delete the folder.

(Watch, people are now going to start sending me Outlook product support questions. Hey, I don't work on Outlook. I'm a hapless victim like you!)

• #### Windows Server 2003 can take you back in time

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 64 versions of a file can be recorded in the snapshot database. Bear this in mind when setting your snapshot schedule. If you take a snapshot twice a day, you're good for a month, but if you take a snapshot every minute, you get only an hour's worth of snapshots. You are trading off snapshot quality against quantity.

Although I can count on my hand the number of times the Volume Shadow Copy service has saved my bacon, each time I needed it, it saved me at least a day's work. Typically, it's because I wasn't paying attention and deleted the wrong file. Once it was because I make some changes to a file and ended up making a bigger mess of things and would have been better off just returning to the version I had the previous day.

I just click on "View previous versions of this folder" in the Tasks Pane, pick the snapshot from yesterday, and drag yesterday's version of the file to my desktop. Then I can take that file and compare it to the version I have now and reconcile the changes. In the case of a deleted file, I just click the "Restore" button and back to life it comes. (Be careful about using "Restore" for a file that still exists, however, because that will overwrite the current version with the snapshot version.)

One tricky bit about viewing snapshots is that it works only on network drives. If you want to restore a file from a local hard drive, you'll need to either connect to the drive from another computer or (what I do) create a loopback connection and restore it via the loopback.

Note that the Volume Shadow Copy service is not a replacement for backups. The shadow copies are kept on the drive itself, so if you lose the drive, you lose the shadow copies too.

Given the ability of the Volume Shadow Copy service to go back in time and recover previous versions of a file, you're probably not surprised that the code name for the feature was "Timewarp".

John, a colleague in security, points out that shadow copies provide a curious backdoor to the quota system. Although you have access to shadow copies of your file, they do not count against your quota. Counting them against your quota would be unfair since it is the system that created these files, not you. (Of course, this isn't a very useful way to circumvent quota, because the system will also delete shadow copies whenever it feels the urge.)

• #### What's the difference between autocomplete and dropdown history?

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 button with a downward-pointing arrow on it. When you click it, a list box with a scrollbar appears. Dropdown history shows you what you already typed into the dialog previously, and its contents are independent of what you've typed so far.

Autocomplete tries to guess what you're typing based on an existing database, typically files on your hard drive or web pages you've visited. The autocomplete dropdown is a popup window that filters itself as you type.

Since dropdown history remembers what you actually typed, the Run dialog history can remember command line arguments. On the other hand, autocomplete is based on what's on the system and what web sites you've visited, so it can suggest things you've never typed. Type "C:\" and an autocomplete window appears with everything in the root of your C drive. On the other hand, autocomplete can't remember command line arguments since that's not what it's drawing from.

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

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 just drag it directly into the pin area.

The bottom list on the left hand side of the Start menu is the "most frequently used" section of the Start menu, which selects the programs you have used the most in the past month or so.

If you right-click an item that happens to be in the Start menu's pin list (either by right-clicking it from the pin list itself, or by right-clicking the original), one of the options is "Unpin from Start menu". If you select this option, then the item is removed from the Pin list.

If you right-click an item on the "most frequently used" section of the Start menu, one of the options is "Remove from this list". If you select this option, then the item is removed from the "most frequently used" section of the Start menu. As far as the Start menu is concerned, you never ran that program. Of course, as you start running the program subsequently, it works its way up the popularity chain and might break into your "most frequently used" list based on your usage after you removed it originally.

The difference, then, between the two, is that each removes the item you clicked from a different list. One removes it from the pin list, and the other removes it from the "most frequently used programs" list. There is a line separating the two lists, but most people don't realize that the line is there for a reason. It's not just a pretty face.

To make things less (or perhaps more) confusing, if you select "Remove from this list" for an item from the pin list, it also removes it from the pin list as well as removing it from the "most frequently used programs" list.

• #### Why does Explorer eject the CD after you finish burning it?

Partly as a convenience, but partly to work around buggy hardware. The developer responsible for CD burning explained it to me.

Most CD drives cache information about the disc in their internal memory to improve performance. However, some drives have a bug where they fail to update the cache after the CD has been written to. As a result, you can write some data to a CD, then ask the CD drive for the data you just wrote, and it won't be there! The drive is returning the old cached data instead of the new data. For most drives, ejecting and reinserting the CD is enough to force the drive to update its internal cache.

"But wait, it gets worse!" I'm told.

Some drives are "smart" and realize you've reinserted the same media, and then don't update. These drives require that you put in another type of media (or pressed CD-ROM media) to force them to update. These drives were manufactured around 2002, and new drives don't have it this bad, but still have the above problem requiring an eject/insertion cycle.

So there's your tip for the day. If you are burning data to a CD and you find the data isn't there, try ejecting the disc and reinserting it. If your drive is particularly buggy, you'll have to eject the disc, insert a different type of disc, then eject that second disc and reinsert the first one.

• #### Why does Windows XP SP2 sometimes forget my CD autoplay settings?

It didn't forget them; it's just double-checking with you.

The developer responsible for CD autoplay in Windows XP SP2 explained it to me. There were two problems with the way Windows XP handled CD autoplay.

First, when you installed a new program that included CD autoplay capability, many users didn't know where in the UI to go to select that new program as their default CD autoplay program. If they had previously selected a program and ticked "Always perform this action", there was no easily-discoverable way to undo the "always" flag to make the dialog reappeared and allow the user to select the new program instead.

Second, many programs, upon installation, secretly hacked the undocumented CD autoplay settings in order to set themselves as the default CD autoplay handler, gleefully overriding the user's previously-stated preference. Because these programs egotistically believed themselves to be the coolest most amazing program ever written in the history of mankind.

In other words, the two problems were, "I just installed this program and I want it to be the CD autoplay program" and its converse "I just installed this program and I don't want it to be the CD autoplay program".

Windows XP SP2 introduced new behavior related to CD autoplay in an attempt to address these problems: When it sees that a new CD autoplay handler is available, it shows you the CD autoplay dialog one more time. This gives you a chance to (a) pick that new program you just installed, or (b) un-pick that program you just installed (if it was presumptuously rude enough to set itself as your default).

The first time you insert a CD into your computer after upgrading to Windows XP SP2, you will also get the CD autoplay dialog. This is a "better late than never" dialog to cover for any handlers that were installed before you upgraded to Windows XP SP2.

What's the moral of the story? Whereas in the old days, you only had to worry about helping other programmers interface with your feature, in the new software landscape, you also have to worry about stopping programmers who are trying to abuse your interface.

• #### Why does Add or Remove Programs show a large blank space?

Some people have noticed that certain programs cause the Add or Remove Programs control panel to create an enormous amount of blank space. What's going on?

These are programs that have bad custom uninstall icon registrations.

If you go to the registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall, you'll find a list of programs that have registered for appearing in the Add or Remove Programs control panel. Some of them might have been so kind as to provide a "DisplayIcon" value, thereby saving the control panel the indignity of having to guess at an appropriate icon.

Unfortunately, if they put a bad icon registration in that registry value, the result is a bunch of blank space since the control panel is trying to reserve space for a bogus icon.

The format of the icon registration is a filename, optionally followed by a comma and a decimal number.

C:\full\path\to\icon\file.dll
C:\full\path\to\icon\file.dll,123


Since this is not a command line, quotation marks are not necessary (although they are tolerated). Furthermore, the number can be any value except for -1. Why is -1 forbidden? Because the ExtractIcon function treats the value -1 specially.

If the icon file does not exist in the icon file, or if the icon number is -1, then the icon specification is invalid and the Add or Remove Programs control panel will reserve an odd amount of space for an icon that doesn't exist.

Perhaps the Add or Remove Programs control panel should be more tolerant of invalid icon registrations? Or should it stay the way it is, adhering to the "Don't bend over backwards to fix buggy programs; force the program authors to fix their own bugs" policy that so many of my readers advocate? (Noting furthermore that refusing to accomodate invalid icon registrations makes it look like Add or Remove Programs is the buggy one.)

• #### If you disable drag/drop on the Start menu, you also disable right-click

This is one of those poorly-worded options.

In the Start menu configuration dialog, you can choose to uncheck "Enable dragging and dropping". This setting disables drag/drop but also disables right-click context menus. The connection between the two is explained in the Group Policy Editor, but is unfortunately oversimplified in the general-public configuration dialog.

Why does disabling dragging and dropping also disable context menus?

History, of course.

Originally, the "Disable drag/drop on the Start menu" setting was a system policy, intended to be set by corporate IT departments to prevent their employees from damaging the Start menu. With this setting, users could no longer drag items around to rearrange or reorganize their Start menu items. This is a good thing in corporate environments because it reduces support calls.

But very quickly, the IT departments found a loophole in this policy: You could right-click an item on the Start menu and select Cut, Copy, Paste, Delete, or Sort by Name, thereby giving you access to the operations that the policy was trying to block. Therefore, they requested that the scope of the policy be expanded so that it also disabled the context menu.

In Windows XP, it was decided to expose what used to be an advanced deployment setting to the primary UI, and so it was. Since it's the same setting, it carried the loophole-closure with it.

• #### Confusion over whether you have Windows XP SP1 or SP2

Some support people have asked me why the "About" dialog seems to be kind of schizophrenic as to whether a machine has Windows XP SP1 or SP2.

Microsoft® Windows
Version 5.1 (Build 2600.xpsp2.040919-1003 : Service Pack 1)

Why does the version string say "xpsp2" and then "Service Pack 1"? Is this machine running SP1 or SP2?

It's running Service Pack 1. The build number string is a red herring.

Why does the build number string say "xpsp2" when the computer is running SP1?

Because Windows XP Service Pack 2 was a victim of changing circumstances.

After Service Pack 1 shipped, there was no indication that Service Pack 2 was going to be anything other than "just another service pack": A cumulative update of the fixes that had been issued since the release of Service Pack 1. Therefore, the release team created a new project, called it "xpsp2" and when a fix needed to be made to Service Pack 1, they made it there. It was called "xpsp2" because the assumption was that when the time came to release Service Pack 2, they would just take all the fixes they had been making to Service Pack 1 and call that Service Pack 2. In other words, "fixes to Service Pack 1" and "working on Service Pack 2" were the same thing.

Of course, things changed, and a "new" Service Pack 2 project was created for the "real" Service Pack 2 changes, leaving the old "xpsp2" project to be merely the place where Service Pack 1 fixes were developed.

Yes, it's confusing. We're kind of embarrassed by the whole project naming fiasco. That's what happens when plans take a radical change after work has already started.

Anyway, there you have it, the long and boring story of why fixes for Service Pack 1 have "xpsp2" in their build string.

• #### Capturing the current directory from a batch file

Sometimes people go to great lengths to get information which is available in a much simpler way. We saw it a few days ago when we found a 200+-line C# program that could be replaced with a 90-byte batch file. Here's another example of a rather roundabout way of capturing the current directory from a batch file.

The easy way is to use the %CD% pseudo-variable. It expands to the current working directory.

set OLDDIR=%CD%
.. do stuff ..
chdir /d %OLDDIR% &rem restore current directory


(Of course, directory save/restore could more easily have been done with pushd/popd, but that's not the point here.)

The %CD% trick is handy even from the command line. For example, I often find myself in a directory where there's a file that I want to operate on but... oh, I need to chdir to some other directory in order to perform that operation.

set _=%CD%\curfile.txt
cd ... some other directory ...
somecommand args %_% args


(I like to use %_% as my scratch environment variable.)

Type SET /? to see the other pseudo-variables provided by the command processor.

Page 19 of 23 (223 items) «1718192021»