Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Location of -preference set- file(s)?

    I'm facing down needing to reimage my hard drive for the third time in a year. It's getting pretty annoying to have to re-tweak my various configurations each time. I know about porting over .ado files, and I've got Sublime Text set up to run as my .do file editor, so that saves me some pain. But I'd really love to be able to just re-load my saved preferences for the other GUI elements.

    I see that (at least as of Stata 15 Nov 21) it's possible to save a -preference set- and load a -preference set-...but I cannot find the location of the file(s) in which those preferences are recorded.

    Can someone point me to the right location? The goal would be to back that up so I can easily restore it once I've wiped the hard drive and reinstalled Stata.
    Click image for larger version

Name:	2018-01-03_16h08_45.jpg
Views:	1
Size:	89.1 KB
ID:	1424236

  • #2
    On my Mac, my system directories are as follows:
    Code:
    . sysdir
       STATA:  /Applications/Stata/
        BASE:  /Applications/Stata/ado/base/
        SITE:  /Applications/Stata/ado/site/
        PLUS:  /Users/lisowskiw/Library/Application Support/Stata/ado/plus/
    PERSONAL:  /Users/lisowskiw/Library/Application Support/Stata/ado/personal/
    OLDPLACE:  ~/ado/
    I created a saved preference file; it was found in
    Code:
     /Users/lisowskiw/Library/Application Support/Stata/ado/
    which is the parent directory within which the PLUS and PERSONAL directories are located.

    Perhaps Stata for Windows is similarly organized.

    Comment


    • #3
      Dear Timothy,

      this is not a new feature of Stata 15. It has been there for a while, since Stata 9 for sure.
      The settings are not saved into a file, but rather into the Windows registry, which is a centralized and recommended storage for all Windows programs. (storage is platform dependent).
      Stata can save and apply the settings programmatically, but it lacks (afaik) the import/export of these settings into a file.
      Commands:

      Code:
      window manage prefs save "SergiyNew"
      // now can mess with the panels
      // ....
      // restore now
      window manage prefs load "SergiyNew"
      See: help window

      If you are comfortable with manual editing the registry files, you can migrate your settings manually.
      The old settings may or may not be applicable on a new machine (screen size/resolution/etc may play a role).

      That said, if you are re-imaging your drive, your Stata and all the associated settings should survive the re-imaging process.

      Best, Sergiy Radyakin

      Comment


      • #4
        Sergiy, William: thanks for the feedback. @William, I'm not seeing anything in those folders other than .do and .ado files - what's the filetype/extension of the preference file you've got? @Sergiy: Thanks for the historical perspective, and for letting me know that the settings live in the registry. That's a very helpful bit of information. I wouldn't have guessed that myself...what do you suppose makes that a preferred design strategy from StataCorp's perspective? And is the "SergiyNew" value searchable somehow within the registry, or is it going to be a matter of navigating my way to the keys manually? Best, TS

        Comment


        • #5
          Timothy, these settings are both searchable and manually navigate-able in the registry. But the best is probably to invest your time into finding why you have to reimage your drive so frequently, and addressing that first, as it will give you much more essential time savings (and peace of mind) across all the software you are using.

          Best, Sergiy

          Comment

          Working...
          X