"Shell Folders" settings in registry RRS feed

  • Question


    We've come across an issue that has us stumped a bit.  When you install Vista Business Edition from scratch via the DVD, the "Default User" profile contains no entries to specify the 'shell folders' for when a new user logs in.  When a new user logs in, it creates a profile based off the default user profile.  When you look in the registry for this new user, you find that the below registry key is populated with numerous folder locations for all the various 'shell folders'.


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


    Things like the "Desktop" location, or "Documents" location, etc. is set for this new user profile.  Even though the Default User profile does not contain any of these settings, Vista obviously will auto-generate these entries when a new user logs in.


    We have created a Vista clone.  We did it by installing Vista from scratch via the DVD.  We have installed a variety of programs, Vista updates, set various things, etc and then sysprep the base clone image and dump it to a computer.  However, when a new user logs into our Vista cloned pc, they do NOT get any of these 'shell folders' entries.  We have the settings empty for the "shell folders" registry key for Default User profile just like the basic manual install of Vista has.


    We are stumped as to why when a new user logs in, Vista doesn't generate those "shell folders" entries.  We've gone over the things we do in our clone and nothing makes sense that it would interfere with Vista creating these registry entries.


    Has anyone else run into a simliar situation and can you offer any helpful information on what may be the cause or solution to our issue?  Thank you.


    Keith Hemmelman


    Thursday, September 4, 2008 9:53 PM

All replies

  • I have seen a similar problem but not exactly the same...we end up with static user information in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders instead of dynamic, changing the user name for each logged in user.


    Built a Vista Business PC,configured user profile to our specifications.  Used a process like this:

    1. Configure the profile to copy then reboot and login as another administrator account.  The profile that I want to copy is always that of either the Administrator or an account with full administrator access.
    2. Open System window from Control Panel > System and Maintenance > System.
    3. Open the Advanced System Settings from the Tasks list and click Continue on the permission prompt.
    4. Click the Settings button under User Profiles.
    5. Highlight the profile you want to copy to the Default profile then click the Copy To... button.
    6. In the Copy To window, click Browse to select the C:\Users\Default folder or just type it into the Copy Profile To field.
    7. Click the Change button under the Permitted To Use section.
    8. In the Select User or Group window, type "Everyone" in the text box then click OK.  Leave off the quotes around Everyone.  Then Click OK.
    9. You are returned to the Copy To window.  Click OK.
    10. A Confirm Copy window will come up that tells you the directory already exists and asks if you're sure you want to continue.  Click Yes.
    11. After the profile is copied, you are returned to the User Profiles window.  Just close all the windows.
    12. Sysprepped PC
    13. Imaged to a new PC, logged in & logged in as a new user.


    However, if we build our profile that we want to copy and use CopyProfile command in our unattend.xml file that will be used with sysprep, then the profile that we are logged in as when running sysprep is copied to Default User and we have no issues with HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders.

    Example of copy profile command in unattend.xml

        <settings pass="specialize">
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <TimeZone>Eastern Standard Time</TimeZone>


    While the above process works for new PC deployments, We are still looking for a way to 'fix' existing Vista PCs that have static user information in Shell Folder key.



    Thursday, October 30, 2008 1:10 AM
  • Steve,

    I ran into the SAME issue, by using the Control panel  "Copy Profile" option instead of the UNATTEND.XML 'COPYPROFILE'.

    I did not want to use the unattend.xml' 'COPYPROFILE', as its not documented what it does/does not copy
    (from what i have read in various forums, it dosnt copy ALL settings). I havent had time to compare the
    'results of the TWO 'COPY Profile' methods, but hope to as time permits.

    I spent 8-10 hours one nite (11pm -8am) trying to indentfy  what the differences are betwwen the NTUSER.DAT
    for a Vista "Default" user profile that works. where a New users Shell Folders registry is populate with their
    USERNAME  vs  the case when a COPIED 'DEFAULT' user profile (ie from ADMINISTRATOR profile) assigns the
    'static' SHELL FOLDERS registry setting to a NEW user at login.

    I 'feel' i was successful at identifying the 'cause' and have created a compiled BATCH file that 'turns back on'
    the DEFAULT user profile option to 'REBUILD' a new users Shell folders. The process also changes the
    NTUSER.DAT hives for ALL EXISTING user profiles, to CHANGE "ADMINISTRATOR' to the 'c:\users\'folder-name',
    where 'folder-name' will be substituted for 'ADMINISTRATOR'  in the SHELL FOLDERS registry key. This is case wher
    the 'ADMINISTRATOR' profile used as the 'DEFAULT' user profiel for Vista.

    In retrospect, i SHOULD have read the Registry to get list of existing  profile names (as i currently just use the existing
    FOLDER name (which may not be valid , for example i made a copy of the 'DEFAULT' user profile and its
    folder name is "COPY - DEFAULT" which would NOT be correct name to be substituded for ADMINISTRATOR).

    I will work on correcting that issue.

    In the mean time, the process is avail, by email request @ james_p_morgan@hotmail.com

    James P Morgan
    Sunday, June 21, 2009 5:58 PM
  • Bump

    Having this issue with Windows 7 too.

    Friday, April 15, 2011 6:15 PM
  • To All,

    As of Sept 18, 2011, i have updated my Shell Folders reset/fixup to address Windows 7 X64 differences..per user request(s)


    The Batch script process is avail upon request: james_p_morgan@hotmail.com or jamespmorgan@gmail.com,


    I will refer ALL to this MS Technet article. Even thought my process 'fixes' the Default user profile and any existing

    user profiles it DOES NOT address the OTHER issues when DEFAULT user profile MANUALLY created using the

    "Windows Enabler v 1.1" tool (to UNGRAY the COPY profile option) or otherwise:


    My process deletes the Reg key necessary to FORCE a FIRST time run actions , in the DEFAULT profile...


    It aslo fixes up ALL the User Profiles to point their SHELL Folders Reg keys to their profile..




    Also, the Default User profile contains some single run actions that occur when the user logs in for the first time, which then setup that user by running those custom actions.

      If you overwrite the Default User profile, those single run actions do NOT take place.

    The manual profile copy process can cause issues such as:

    • Their list of most frequently run programs is not cleared
    • Whether the user has been introduced to the Start menu (will be set to TRUE for the source account, but should be FALSE for new users). Windows Explorer does some special things the first time you log on to introduce you to the Start menu and other new features.
    • Whether the user is an administrator (and should therefore see the Administrative Tools, etc).
    • The personalized name for “My Documents” will be incorrect. All users documents folders will be called “Administrator's Documents”.  This is documented in the Knowledge Base article “The Desktop.ini File Does Not Work Correctly When You Create a Custom Default Profile” (http://support.microsoft.com/?id=321281).
    • The default download directory for IE will be set to the Administrator's Desktop folder.
    • The default Save and Open locations for some application with point to the Administrator's documents folder.
    • Windows 7 Libraries are broken

    The Batch script process is avail upon request: james_p_morgan@hotmail.com or jamespmorgan@gmail.com,

    Due to recent LAYOFF after 30 years , i am 'looking' for some part time IT work, that can be done remotely, so keep me in mind.

    Thanks.. James P Morgan - 407-222-5365



    Sunday, September 18, 2011 4:50 AM
  • To Al,,


    One other 'issue' that i need to clarify. This process has NOT been tested with Roaming profiles or situation

    when the Defailt profile is Network based.

    James P Morgan


    Sunday, September 18, 2011 4:40 PM
  • I just ran into this problem myself on Windows 7 Enterprise, and I think I know how to get past it (without running sysprep).

    So from what I can gather, it seems that when you use sysprep to configure the default user profile, the "HKCU\Software\Microsoft\Active Setup\Installed Components" registry key gets cleared out before it is copied over. This makes Windows re-run any "first logon" customizations the next time the profile is used, one of which resets the values of the profile's "Shell Folders" key to valid ones.

    The specific command that fixes the Shell Folders registry key seems to be:

    regsvr32.exe /s /n /i:U shell32.dll

    Deleting the following registry key on the default user's profile prior to copying it seems to do the trick (this key will be re-created the next time a user logs on to the profile):

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{89820200-ECBD-11cf-8B85-00AA005B4340}

    Note: It seems that the command will not create the Shell Folders registry key automatically - it must exist (even if the values are missing or incorrect) for this to work. This is not the recommended way of configuring a default user profile, so please do this at your own risk.

    EDIT: Changed the registry key that needs to be modified, pasted the wrong one in here earlier. The component responsible for this fixing the shell folders is {89820200-ECBD-11cf-8B85-00AA005B4340}, and NOT {2C7339CF-2B09-4501-B3F3-F3508C9228ED} as I posted originally. While I'm at it, here's the entire batch file I used to fix this:

    @echo off
    :: Try to modify the default user profile
    reg load HKEY_USERS\.LOCALDEFAULTUSER "%systemdrive%\users\default\NTUSER.DAT"
    if %errorlevel%==0 goto doIt
    :: Try the XP path
    reg load HKEY_USERS\.LOCALDEFAULTUSER "%systemdrive%\Documents and Settings\Default User\NTUSER.DAT"
    if %errorlevel%==0 goto doIt
    echo Failed to open the local default user's registry hive
    goto done
    reg delete "HKEY_USERS\.LOCALDEFAULTUSER\Software\Microsoft\Active Setup\Installed Components\{89820200-ECBD-11cf-8B85-00AA005B4340}" /f
    reg add "HKEY_USERS\.LOCALDEFAULTUSER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /f

    Aric Vogel

    • Edited by AVogel95 Monday, October 28, 2013 12:25 AM Batch file
    Sunday, October 27, 2013 11:19 PM