Rss

Windows 7, Windows\CSC, Manage Offline Files & the Sync Center

I miss the old days of Windows when there was always a way to get something done. Fast. There was always a “do it anyway” button, if you will, with Microsoft products. You could hack it together and no matter what, you could find a way to make even the most unstable, cobbled-together idea, become stable and useful for years and years.

Three months ago, I wanted to search a mapped network drive in Windows 7 only to have it produce incomplete results nearly every time. I realized somehow that Windows wanted me to configure the network drive with the Manage Offline Files feature in Windows 7 and then index it using Windows Search because, for whatever reason, there’s no “index-it-over-the-network-anyway” button. So I did, and the search results were somewhat more complete, however, using a lot of hard drive space since it was now maintaining an unencrypted copy of an 80GB TrueCrypt volume worth of data on my local drive.

You can “encrypt” offline files by clicking the “Encrypt” button, though, which can be pretty useful if you implement it correctly.

Nevertheless, I still had a lot of incomplete search results. Most of the files were PDFs, Word documents, and the like. I set all of the filetypes to search contents as well. There were two layers of slowness: (1) the “Sync Center” which now had to synchronize all changes over the network, and I had to keep a close eye on it to make sure it was actually syncing and keeping things up to date because it often wasn’t doing it fast enough; and (2) the Search Indexer, which doesn’t have any settings for something like “high priority” so that it would work at full capacity to keep the index up to date. Because my system is almost always busy doing something, the results were most often incomplete.

I elected to disable Offline Files and just go back to the plain old mapped network drive. It was taking up too much hard drive space, and taking up far too much of my time babysitting the whole process. Not only that, but I went ahead and disabled the search indexer entirely, which forces Windows 7 to perform a real search of the contents every time I type something resulting in up to date, incredibly slow, accurate search results. I don’t recommend doing this, it is just horribly slow.

During the latest MSE full virus-scan I performed, I noticed some very familiar files in my Windows\CSC (which stands for “Client Side Caching”) directory. They were the entire drive contents of the mapped network drive that I previously disabled from the Manage Offline Files feature! All of the files were still there residing on my local machine. Incredibly, they were never deleted automatically when I disabled the feature.

I opened up the Windows\CSC directory and the default permissions don’t allow access. So I had to right click and take ownership of the folder in order to be able to view the contents. Once I did, sure enough, I verified that everything was still there, an entire copy of the drive since I disabled Manage Offline Files. I was honestly very surprised to see those files still there with no warning or any indication that they weren’t deleted. Some cursory online research revealed that deleting the files manually would “break” the Offline Files feature, so, I proceeded revisit the Manage Offline Files feature and try to remove the files the “right” way.

Unfortunately, because I had disabled the feature, all the buttons were grayed out and I had to restart in order to enable them.

After restarting, I clicked “View your offline files” and went into mapped drives, right clicked and unchecked “Make available offline.” Windows then proceeded to comb through every single file in the \CSC directory, I can only guess that it was changing some flag on each file. Once it was finished, I then right clicked again and clicked delete. Again, Windows combed through all of the files informing me that it was deleting the local copies of the files, but that network data was not affected.

After three hours of it “deleting” the files. I right clicked the namespace folder inside of the CSC folder and wouldn’t you know it — everything was still there. I couldn’t tell you what Windows was doing for those three hours, but it certainly wasn’t deleting all of those files. Just for good measure, I right clicked again and selected delete only to see Windows begin to comb through the files again, needless to say I canceled this operation and went to delete the folder manually directly from Windows Explorer.

It only sorta deleted. There was one file that was too long, and Windows has a strange quirk whereby if a file is too long, Windows will not permit you the option to delete or rename it. So, without hesitation, I opened up an elevated command prompt, navigated to the directory within the \windows\csc\ directory and deleted the file using del *.pdf.

Curiously, there were folders which I was unable to access all over the place. Every time I would shift+delete a range of folders, Windows would delete everything until it would come across something that I didn’t have permissions for and would immediately halt the entire operation and wouldn’t continue to delete the stuff that I did have permissions to delete. I had to take ownership of quite a few extraneous folders just to be able to delete them. I couldn’t even begin to tell you why Windows elected to make certain folders have restricted ownership inside of its caching mechanism. It’s all very mysterious.

While I’m at it, have a look at these two dialog boxes. I can’t help but wonder what inspired individual created the former one.

It seems to be the first folder of every other subfolder that needs to have ownership permissions set. I’d really love for a Microsoft software engineer to explain the logic behind this to me. This whole ordeal easily took up four hours of my time to get rid of all the cached files and get the Sync Center fully disabled.

In the end, I found Windows Search to be completely unusable without the indexer enabled. So, I installed a spare 250GB drive into my system and dedicated it exclusively to the indexer (and a few other applications that have indexing features as well). Windows searches, as you might expect, perform much better with the index folder residing on a separate hard drive and somehow, the results are more complete — although I have no scientific method of “proving” that theory.

Most of all, though, having the index folder on another hard drive seems to update quicker. When I left the Indexing Options folder open, I would usually immediately see an increase in the “items indexed” area when I would add a new file. When I used to have the index folder on the main C: drive, it could take anywhere from a minute to half an hour to see that update.

When Microsoft rolled out the updated Windows Desktop Search add-on for XP back in 2006, you could force it to index whenever you wanted, so, even if your PC was busy doing a virus scan you could still force it to index while you were away. In Windows Vista, you were afforded the ability to force the indexer to search unindexed locations — a feature that is sorely missing from Windows 7. But, more on that later.

admin@variableghz.com

Comments (3)

  1. Shikaar_Dantheras

    I found an easy way to clean the CSC offline file cache in Windows 7 here:
    http://cyberst0rm.blogspot.com/2011/09/how-to-delete-csc-offline-files-cache.html

    Hope this helps.

  2. Shikaar, that’s great! Thanks for posting – I’ll give that a try on my afflicted system.

  3. Long Path Fixer presents you with a simple list of files and folders in the current directory (including “hidden” files and folders). You can drag and drop files or folders onto it and it will navigate directly to path of whatever you dropped.

Leave a Reply

Your email address will not be published. Required fields are marked *