Use ccontrol qlist to get structured information about available instances.

ccontrol qlist [<instance>] [nodisplay > outputfile]
Display a quick list of information about all installed instances, in a format suitable for parsing in command scripts.
The record for an instance contains fields separated by "^" (carats):

  • Field 1: instance name
  • Field 2: instance directory
  • Field 3: version identifier
  • Field 4: current status for the instance
  • Field 5: configuration file name last used
  • Field 6: SuperServer port number
  • Field 7: WebServer port number
  • Field 8: JDBC Gateway port number
  • Field 9: Instance status (e.g., ok, warn, alert)
  • Field 10: Product name of the instance
  • Field 11: Mirror Member Type (e.g., Failover, Disaster Recovery)
  • Field 12: Mirror Status (e.g., Primary, Backup, Connected)

1.Variables are defined or referenced via <var>, yes, but you can pass the values to the Installer from your script. For example, check MDX2JSON installer:

Set pVars("User")="web"
Set pVars("Password")="dsweb"
Set pVars("Namespace")="TEMP3"
Set pVars("Import")=1
Set pVars("SourceDir")="C:\temp\MDX2JSON\MDX2JSON"
Do ##class(MDX2JSON.Installer).setup(.pVars)

2. You set environment variable in cmd (Windows):

set NEWVAR=SOMETHING

And after that you can get it from installer with:

$system.Util.GetEnviron("NEWVAR")