missing curly brace...
moved the setting of a machine environment variable to the postInstall where execution is already elevated.