www.fgks.org   »   [go: up one dir, main page]

Friday, August 5, 2016
  • Home
  •             

Moving the Offline Files Cache in Windows Vista

December 29th, 2006 by Patrick Elliott

Thanks to Jill Z, Navjot Virk, Sriram Srinivasan, and Shubhankar Sanyal for posting this over on The Filing Cabinet.   I wasn’t aware you could do this, so I’ve learned something new myself (and it’s useful because *everything* (offline files, my documents, pictures, etc) is redirected to my secondary partition now)

“Several customers have asked us how to move the Offline Files cache location from the default location (c:\windows\csc) to another volume. Here is a procedure for doing this.

Continue reading here…

  1. From an elevated command prompt, run the following command:
    REG ADD “HKLM\System\CurrentControlSet\Services\CSC\Parameters” /v MigrationParameters /t REG_DWORD /d 1 /f
  2. Run the following command as a user who is a local administrator, substituting the drive letter if necessary:
    c:\windows\system32\migwiz\migwiz.exe
  3. In the Windows Easy Transfer wizard, select the following options as you progress through the wizard:
    a. Click Start a New Transfer.
    b. Click My old computer.
    c. Click Use a CD, DVD or other removable media.
    d. Click External hard disk or to a network location.
    e. Enter a path where you want to save Savedata.mig, and then click Next.
    f. Click Advanced options.
    g. On the Select user accounts, files, and settings to transfer page, do the following: 
        i. Deselect all check boxes.
        ii.Under System and program settings (all users), expand Windows Settings, expand Network and Internet, and then select the Offline Files check box.
       iii. Repeat the previous procedure for each user listed on the page.
    h. Click Next to begin the transfer process.
  4. In the registry, create a string value called CacheLocation under HKLM\System\CurrentControlSet\Services\CSC\Parameters. To this value, assign the NT format name of the new folder where you want the cache to be. For example, if you want the cache to be in d:\csc, type \??\d:\csc.
    Create d:\csc (or whatever path you used in the previous step).
  5. Restart the computer.
  6. Run c:\windows\system32\migwiz\migwiz.exe and select the following options as you progress through the wizard:
    a. Click Continue a transfer in progress.
    b. Click No, I’ve copied files and settings to a CD, DVD, or other removable media.
    c. Click On an external hard disk or network location.
    d. Enter the path to the .mig file created in Step 3e.
    e. Map the user account on the old computer to the corresponding one on the new computer.
    f. Click Next, and then click Transfer. 
  7. Log off, log on, and then make sure you can correctly access your offline files.

Deleting the Old Cache
Assuming everything got moved correctly, you can delete the old cache from an RC1 build by typing the following commands from an elevated command prompt:

takeown /r /f c:\windows\csc
rd /s c:\windows\csc

The limitation of this method of deleting the old cache is that Takeown.exe can only process paths up to MAX_PATH (260) in length. If this path length is exceeded, the takeown command will fail. To work around this, the suggested method is to move the cache location back to the old one using step 4 again, set a registry key to clear the cache, reboot, and then move the cache back to the new location. Here are the steps.

  1. Due to step 4 above of cache moving instructions, there should already be a string value called CacheLocation under HKLM\System\CurrentControlSet\Services\CSC\Parameters. To this value, assign the NT format name of the old folder where the cache was previously stored. For example, if the old cache was in c:\windows\csc, type \??\c:\windows\csc.
  2. Restart the computer.
  3. In registry, create a DWORD value called FormatDatabase under HKLM\System\CurrentControlSet\Services\CSC\Parameters. To this value, assign the value of 1.
  4. Restart the computer (and log in preferably as a local admin user, so that folder redirection does not kick in again. The other option is to disconnect the network before you log in).
  5. Now assign the CacheLocation reg key back to the new location like step 4 of cache moving instructions.
  6. Restart the computer. “

Thanks to those mentioned above for this!  Happy Holidays!

Patrick

Posted in Testing, Windows Vista | 1 Comment »


This entry was posted on Friday, December 29th, 2006 at 1:09 am and is filed under Testing, Windows Vista. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.


One Response

  1. cBrain Says:

    Thanks for your great article. would you please give some example on “NT format name of the folder name” \??\d:\csc ? What should I fill in the first part ?? thank you very much !!