Mattermost desktop opens itself after silent install on Windows

Is there a command line option we can pass to mattermost desktop so that it doesn’t open the program right after install? We are placing the configuration file in the %APPDATA% directory by overwriting the old one, but if the application launches before the configuration file has been updated it will not launch with the correct config.

We followed the recommendations here ->

Which desktop app version are you on?


@deanwhillier @paulrothrock Do you know if this is possible?

It appears that the configuration as documented in the deployment guide doesn’t work at all.

I am using mattermost-destop-setup-4.2.2-win.exe.

Even if I quit the first start and manually delete/replace the config.json it doesn’t work. The only thing I have not tried is creating the config file first, and then installing the app.

For small to medium deployments recompiling the app is just not worth it just to change the default settings or add a default server.

1 Like

I’m still waiting on a solution to this issue. For any size deployment noone should have to recompile the entire app for a setting when we have a configuration file.

AAAAAND I found it.
Invalid config files are apparently silently ignored and replaced by the default.

The trick:
Preconfigured teams need an order.
The “teams” array requires an undocumented third parameter: “order”: 0 (obviously increasing for each team you want to preconfigure).

so the “teams” setting needs to look like this:

"teams": [
    "name": "community"
    "url": ""
    "order": 0
    "name": "Test"
    "url": ""
    "order": 1

Oh cool how did you find the undocumented setting :smiley:

I simply compared the config.json after manually entering the server details with my preconfigured one and found 3 differences:

  1. “version” is 2 (was 1) - this is automagically updated, no need to change it (but probably better to use 2 going forward)
  2. “teams” now have a third parameter “order” for each team
  3. “darkMode”: false appeared as a new setting

Ahh yes I did notice the version and darkMode setting but I didn’t see the parameter for teams.