Working with variable from .cmd file in Ensemble manifest
Hi,
let me apprise you with my problem:
I want to install Ensemble by Unattended Custom Instalation which use my Installation Manifest. It should start from cmd. So I've got everything in .cmd file to start whole installation by only double click. The problem is that I want to set some variables here in .cmd file and use them in Installation Manifest for installation Ensemble. It is about variable with path to some packages which should be imported during instalation.
So are there some solutions, or can you give me link to documentation.
Thanks for all answers.
Zdeněk
Comments
1. You can pass variables to installation manifest.
2. You can set environment variables and get them in ObjectScript:
set env = "MYVAR"
set val = $system.Util.GetEnviron(env)Ok thank you so much but I've got some more questions.
1. You mean passing variables to installation Manifest by tag <var> is it right?
2. This is maybe stupid, but if i set var like this, how can I get to them by my .cmd file is there any possibility?
But once again thak you so much.
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=SOMETHINGAnd after that you can get it from installer with:
$system.Util.GetEnviron("NEWVAR")Yes ok I undertand both solutions, but only the last question.
If I try set the variable in (Windows) cmd as you and try to write it in Ensemble terminal it return empty string. Do you know reason why?
Variables are local to the process.
Ok thank you so much for you time and helpful answers. You helped me really much. Thanks.