Place yourself in the registrybranch Explorer
(fullpath is HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer
). Two keys holds profile-related path-values:
Name: Shell Folders
Charateristics: When not explicitly set in Group policy, literal paths are used (ie C:\Documents and Settings\carl\appdata
Name: User Shell Folders
Charateristics: When not explicitly set in Group policy, relative paths are used (ie %USERPROFILE%\Application Data
Having used redirection I need to bring the appdata-settings back to default from redirected using Group Policy Preferences (Disabling redirection in Group Policy does not change the appdata setting back to the default, hence the hole issue).
Changing the REG_SZ-settings (Shell Folders) is not an issue, but the REG_EXPAND__SZ (User Shell Folders) is.
The Data that needs to be written to the Appdata value is exactly %USERPROFILE%\Application Data
, but when I do as per the image underneath:
is translated into C:\Documents and Settings\<username>
, as illustrated in the next picture:
If i could only escape the %-character like in program languages (In Powershell I would ie use the escape-character ` if i wanted to escape ",$ etc).
Any input is greatly appreciated...
Anders from Randers, Denmark