Change Application Data location

by admin on July 30, 2009

Application data folder, by default, is located in user directory. In Windows XP  you can find it at the location ‘C:\Documents and settings\Loginid\Application Data‘ where as in Vista and Windows 7 you can find it in ‘C:\Users\Loginid\Application Data‘. But in case if you want to move application data folder to some other location you can do it by editing registry keys. There is a little bit difference how application data folder is structured in Windows XP and Windows7/Vista.

Windows XP

In Windows XP we can change the location of Application data folder by editing the registry value Appdata under the following node in registry.

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

Registry value:  appdata
Type: REG_EXPAND_SZ

You need to assign the path of the new location to the above registry value.

Instead of opening registry editor and editing the key manually you can simply run the following command in a command window.

Reg.exe add “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders” /v “Appdata” /t REG_SZ /d/f

For example to make e:\appdata as the new location of appdata folder the command would be:

Reg.exe add “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders” /v “Appdata” /t REG_SZ /d “e:\appdata” /f

Vista / Windows 7

In Vista and Windows 7 editions application data is organized into two folders namely local and roaming. The default appdata registry key points to the roaming folder location where as a new registry value ‘Local Appdata‘ is introduced to point to the local appdata folder.

In Windows 7 we can change application data folders location using GUI also. You can open application data folder by running appdata from Run window. right click on the folder for which you want to change the location, click on location tab and specify the new path of the folder.

As with Windows XP, we can change the location by editing registry key too.

To change local application data folder we need to run the below command.

reg.exe add “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders” /v “Local Appdata” /t REG_SZ /d/f

To change roaming application data folder the command is:

reg.exe add “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders” /v Appdata /t REG_SZ /d/f

If you see any issues in changing application data folder location please write it in the comments section below.

Relevant Posts:

Opening application data folder from Run window

{ 9 comments… read them below or add one }

Anonymous November 16, 2009 at 12:21 am

Thanks for pointing me in the right direction. I'm running Win 7 on an SSD drive and I want to do as little i/o on that drive as possible. My RAM drive will work much better.

Reply

Techblogger February 25, 2010 at 3:25 pm

the above regkey change works for windows 7 too

Reply

Irfan Ahmed Khan September 12, 2011 at 7:22 am

Dear Sir,
Its giving access denied error that i have administrative rights kindly advice
regards,
Irfan

Reply

admin December 24, 2011 at 1:28 pm

Make sure that you run the commands from elevated command prompt.

FabioGNR November 12, 2011 at 7:10 pm

When i try to change location by GUI ( windows 7 )
Everything goes right but there are a few locked files which i cant copy. Is there anyway of changing location during startup so those files aren’t locked?
Thanks for sharing the method.

Reply

admin January 4, 2012 at 5:30 pm

There are some tools in the web which you can use to copy files even if they are locked.

murka December 24, 2011 at 1:12 pm

Am i the only one who gets a complete windows breakdown after this change? Windows explorer stops working and i can’t access any files once i change the path and restart, requiring a windows reinstall.

Reply

admin December 24, 2011 at 1:30 pm

This, by no way, should affect OS functionality. Installed applications might stop working, it will not break OS. There could be some other reason in your case.

Andres February 3, 2012 at 6:34 pm

I made the changes but when I run “appdata” it still opens the location on the C: drive. I have restarted the machine after making the changes. I want to delete what’s in the C: drive appdata folder, but I’m not sure I can do that without losing all my stuff, and I can’t rename it. Any ideas? I need to free up space on my SSD C: drive to upgrade from Vista to Windows 7. Thanks.

Reply

Leave a Comment

Previous post:

Next post: