Controlling ProgramData Folder Setting

About ProgramData Folder:

The ProgramData setting specifies the path to the program data folder. Path_to_program_data_folder is a string with a maximum length of 259 characters. This string type does not support empty elements. Do not create an empty value for this setting.

The registry location of this setting is:

C:>reg query "HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionProfileList" /v ProgramData

HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionProfileList
    ProgramData    REG_EXPAND_SZ    %SystemDrive%ProgramData

C:>

Redirecting ProgramData to other drives/folder:

Many times, when you have to setup an application that needs to use a different set of ProgramData files located in a different folder on the same or different drive.  The option is to modify below environment variables for the user/machine context to have the application pickup the ProgramData files from your intended path.

 

Default values of ProgramData environment variables:

ALLUSERSPROFILE=C:ProgramData
ProgramData=C:ProgramData
SystemDrive=C:

 

Values of ProgramData environment variables redirect to a custom path:

ALLUSERSPROFILE=H:ProgramData
ProgramData=H:ProgramData
SystemDrive=H:

 

To modify these environment variables you can use set command as shown below:

H:>set SystemDrive=H:

H:>set ProgramData=H:ProgramData

H:>set ALLUSERSPROFILE=H:ProgramData

H:>

 

Verifying the changes got successfully saved:

H:>set | findstr /C:H:
ALLUSERSPROFILE=H:ProgramData
ProgramData=H:ProgramData
SystemDrive=H:

H:>

 

 

 

 

 

 

 

Related Articles: Relocation of the Users directory and the ProgramData directory to a disk drive other than the disk drive that contains the Windows directory on a Windows Vista-based or a Windows Server 2008-based computer

Leave a Reply

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