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")

It sets object id directly instead of setting oref.

Consider these 2 classes:

Class Person Extents %Persistent {

Property EmployedAt As Company;

}


Class Company Extends %Persistent {

}

Usually you assign Company to Person this way:

set person = ##class(Person).%New()
set companyId = 123
set company = ##class(Company).%OpenId(companyId)
set person.EmployedAt = company

But with PropertySetObjectId you can expedite things

set person = ##class(Person).%New()
set companyId = 123
do person.EmployedAtSetObjectId(companyId)

The main advantage is that company object doesn't have to be opened.