Compass' global config file on Windows is not in a stable location.

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Installation
    • None
    • Environment:
      OS:
      node.js / npm versions:
      Additional info:
    • 2
    • None
    • None
    • Developer Tools

      While reviewing https://github.com/10gen/docs-mongodb-internal/pull/15313 with the help of Himanshu we found that the global config file location on windows is actually in a very "unpredictable" location:

      https://github.com/mongodb-js/compass/blob/6ac88e60ed3d0753baeaa1f986f79401dccadd63/packages/compass-preferences-model/src/global-config.ts#L15-L33

       
      it is mongodb-compass.cfg in the parent folder of the executable. BUT.. where that executable ends up depends on how you installed compass:

      • If you used the .msi then what's in the linked docs PR is correct.
      • If you used the setup .exe (the most likely use case and also the recommended one because it is the only one that supports auto-update), then it ends up in something like the parent folder of C:\Users\Administrator\AppData\Local\MongoDBCompass\app-1.47.1\MongoDBCompass where AppData is something set in the registry somewhere and it is more hidden than ordinary files hidden in explorer. And as you can see the version of compass is part of the path. And C:\Users\Administrator\AppData\Local\MongoDBCompass\app-1.47.1 is not a nice and stable location for a global config file.
      • If you used the .zip it ends up in the parent folder of where you unzipped compass which is again not a path that's likely to survive between different compass versions.

            Assignee:
            Unassigned
            Reporter:
            Le Roux Bodenstein
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: