This project has moved and is read-only. For the latest updates, please go here.

Supplying default values to installer

Setup will look for a setup.json file in the same directory during installation of Fop2DD. If this file is found it will be passed to Fop2DD as default settings file. You can also start Fop2DD with an argument specifying the path to a json file which Fop2DD will use to read settings from.

Simply put: setup will always pass {src}\setup.json to Fop2DD (where {src} is the path of the installer). When you launch Fop2DD specifying a .json file, Fop2DD will try to read the specified file and extract settings from it.

The JSON file can contain any of the following settings (shown below with their default values):

/* Sample setup config file */
  Host: "",
  Port: 4445,
  PingInterval: 20,
  Username: "101",
  PBXContext: "mycontext",
  Password: "mysecret",
  FOP2Url: "",
  GrabMinLength: 6,
  ConnectTimeout: 10,
  GlobalDialHotkey: "Control + F8",
  DialCmd_File: "",
  DialCmd_Args: "",
  DialCmd_WorkDir: "",
  DialCmd_MinLength: 6,
  FOP2UserPortal: ""

If you are rolling out Fop2DD in an environment with many users it can become tedious to change the settings for each user; so you could create a setup.json file in the same directory as the setup with the following contents:

  Host: "",
  Port: 4445,
  PingInterval: 60,
  PBXContext: "foocontext",
  FOP2Url: "",
  FOP2UserPortal: "",
  GlobalDialHotkey: "Control + F3"

Each time the installer is run the above values will be used as defaults. You can also launch Fop2DD passing a JSON file as argument:

fop2dd.exe "D:\corporate settings\fop2dd\oursettings.json"

This will have the same effect; Fop2DD will try to read these settings and use these.

Make sure the file is a VALID JSON file; invalid files will not be read/imported. Also not that single-line comments (e.g. "//this is a comment") are not supported.

Last edited May 10, 2013 at 2:06 PM by RobIII, version 3


No comments yet.