Home  /  Resources & support  /  FAQs  /  Stata 7: Windows NT preferences
Note: This FAQ is for users of Stata 7. It is not relevant for Stata 8.

Stata 7: Stata will not save my preferences under Windows NT. How can I save my windows preferences in Windows NT?

Title   Stata 7: Windows NT preferences
Authors Kyle Willman, StataCorp
Jeremy Wernow, StataCorp

For some reason, on some computers Windows NT does not let Stata create the appropriate registry keys to save its preferences. You may either download a file that will create these keys for you or create the top-level keys by hand with the registry editor. Stata should then be able to save its preferences.

Create these keys automatically

  • Download stataprefs7.reg and save it to your desktop. (If you are using Stata 6, use stataprefs.reg.)
  • After saving it on your desktop, double-click it to add the keys to your registry.
  • Stata should now be able to save its preferences.

Create these keys by hand

Note: If you are using Stata 6, where Stata 7.0 appears below, substitute Stata 6.0.

To start the registry editor, pull down File → Run from the Program Manager if you are using NT 3.51 or click Start → Run if you are using NT 4.0. Then type regedt32. Depending on your setup, you may need to type regedit /v instead. Start with regedt32, and, if that does not work, type the other.

When the registry editor comes up, you should see several folders on the left. One of them will be HKEY_CURRENT_USER. Double-click it to open it.

There are actually two different versions of the Registry Editor. One version will allow you to choose Edit → New → Key (A). The other will allow you to choose Edit → Add Key (B). Use the appropriate section below:

  1. One of the folders under HKEY_CURRENT_USER should be Software. Click once to highlight it. Then pull down the Edit menu, click New, and click Key. The Software folder should open up, and you should see something like "New Key #1" highlighted with the cursor blinking. Type Stata and press Return.

    Click this Stata folder to highlight it and pull down Edit → New → Key. Again you will see "New Key #1", this time under the Stata folder. Type Stata7.0 and press Return.
  2. One of the folders under HKEY_CURRENT_USER should be Software. Click to highlight it. Then pull down the Edit menu and choose Add Key. Leave the Class field blank and fill in the Key name field with Stata. Click OK.

    Click this Stata folder to highlight it and pull down Edit → Add Key. Fill in the Key name edit field with Stata7.0 and click OK.

    At this point, if you have done everything correctly, you should see
          HKEY_CURRENT_USER
           |
           |
           --Software
              |
              |
              --Stata
                 |
                 |
                 --Stata7.0

There will, of course, be other folders around these, but this structure should exist.

Now, exit the registry editor, start Stata, move some windows around, and save your preferences. Exit Stata and restart it. Your saved preferences should now be loaded.

If you are working with a network copy of Stata, you will have to perform these instructions on every networked PC. Although Stata is not actually installed on these computers, it will make changes to the registry of each individual PC.

At this point, you are finished with the fix. If you are still having problems, there are a few things you can check to see if you have made a common mistake while attempting the fix. When you have created new sublevels such as this, you want to make sure that you have created new keys as sublevels. Below is a diagram of the correct level hierarchy and a diagram containing the possible error.

          HKEY_CURRENT_USER
           |
           |
           --Software
              |
              |
              --Stata
                 |
                 |
                 --Stata7.0


          HKEY_CURRENT_USER
           |
           |
           --Software
              |
              |
              --Stata
              |
              |
              --Stata7.0

As you can see, the Stata7.0 key would not have been created as a sublevel in this example.

Another common mistake is that sometimes a space is put between the program name and the version number.

        Example:  

          HKEY_CURRENT_USER
           |
           |
           --Software
              |
              |
              --Stata
                 |
                 |
                 --Stata 7.0

As you can see, Stata 7.0 was entered instead of Stata7.0.

If all else fails, open the registry editor so that it shows the HKEY_CURRENT_USER, Software, Stata, and Stata7.0 keys. Press Print Screen to take a screen shot of it, paste that into Microsoft Word, and email it to [email protected].