• How-to Create a default user in Windows Vista/7

    by  • 2009/09/26 • 7, How-to, Vista, Windows • 0 Comments

    In Windows Vista and Windows 7 there are two ways you can create a modified default user profile. One is automatic and the other is manual. The automatic way is the recommended way according to Microsoft. However, you may run into some problems using this way so I will explain it the manual way too.

    First up is the automatic way. For the automatic way you have to use the system preparation (sysprep) tool that Microsoft provides built into Windows Vista and 7. This tool is used for a variety of things but is mainly used for when you need to create a single computer image to put onto multiple machines. To see all the crazy things sysprep can do read the technical documentation on creating an unattend.xml file for sysprep to change everything from your sidebar widgets to your computer name.
    Once you have your unattend.xml file created you just need to make sure you have the CopyProfile option turned on in the “specialize” pass and you should be all set.

    <CopyProfile>True</CopyProfile>

    A few things to note if you are going to do it this way.
    1. The account you run the sysprep command from is going to be the account that is copied to the Default profile. So make sure the account you are running sysprep from has admin rights and is set up exactly as you want it.
    2. The administrator account is removed during sysprep. Even if you have everything set up the way you want it to be admin will get the same settings as Default user unless you do some fancy scripting.
    You can do some more reading on using this method with the following KB article.

    Now for the manual method. This method is good if you don’t want to sysprep the computer because all you want to do is change some items for all the users that are going to be logging into a computer. I got all this information from this technet thread but I have used this mothod pretty extensively.
    First thing you have to do is to create the profile just as you want it (same as the automatic steps). In this situation though you need to create a second user account because you are going to use the local administrator account to copy all of the settings from the second account to the default profile.
    Once everything is set up just the way you want it, restart the computer and log into the local administrator.
    After you log in follow the steps below.

    1. Right click Computer and select Properties
    2. Select Advanced System Properties (elevating as required)
    3. In the system properties dialog click the Settings button under User Profiles
    4. Select the account you want to use as a template
    5. Click Copy To
    6. Change the “permitted to use” option to “Everyone”
    7. Use the Browse button to select the location of the default profile (C:UsersDefault) You will need hidden files shown to see this.
    8. Click OK
    9. Click Yes to overwrite the existing default profile

    The steps above copy all the files and settings to the profile but there are still things in there that probably reference your old account you had created. To get rid of all those references to the other account you will need to edit the registry hive of the Default user. Follow the steps below to remove all traces of your template account from the default user.

    1. Enable “Show hidden files and folders” in Folder Options
    2. Disable “Hide Protected Operating System files” in Folder Options
    3. Launch Regedit
    4. Select HKEY_USERS and go to File -> load hive
    5. Navigate to the profile directly of the user you want to load (e.g. C:usersdefault for the default user)
    6. Open the ntuser.dat file
    7. Provide a name for the hive, this will be used as the root key name for that hive under HKU
    8. Search the hive for any reference to your old user account.
    9. When you find any keys that reference your old user account you can delete the keys (they will be re-created when someone new logs in).
    10. Unload the hive before attempting to log in as the user

    After you have finished you can log in with a new user to test that all the correct settings transferred to the default profile. If you are satisfied with everything go ahead and go back to System Properties -> Advanced System Properties -> User Profiles and delete the account you set up for the Default User template.

    If you have any questions, comments, or problems feel free to leave a comment. I hope this helps.

    About

    Avid learner with a passion for technology and people. He is always trying new things or taking something apart to make it better.

    Leave a Reply

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