I have created an AWS Systems Manager Distributor Package. It is very specific to my environment. I would like to generalize it. In the install.ps1 file I currently have:
msiexec /i mymsi.msi PARM1="TEST-1" PARM2="360fc9f925458cd2039a299" /qn /L*v myinstall.log
I would like to generalize this such that my install.ps1 file would look something like this:
msiexec /i mymsi.msi var1="{MYPARM1}" var2="{MYPARM2}" /qn /L*v myinstall.log
Then when performing the distribution, I would include MYPARM1, MYPARM2 as part of the distribution. This would allow a public distribution of the product to various customers who are provided values for MYPARM1, MYPARM2
I think these parameter values would go in the "Additional Arguments" section when using the AWS Console to Install the Distributor
This required reverse-engineering a third-party add-in:
1-within the *.ps1 files parameters are read. The parms must have a prefix of SSM
Example install.ps1 :
$MYPARM1=$env:SSM_MYPARM1
$MYPARM2=$env:SSM_MYPARM2
msiexec /i mymsi.msi var1=$MYPARM1 var2=$MYPARM2 /qn /L*v myinstall.log
2 - When supplying Additional Arguments to the AWS portal, provide the following
{
"SSM_MYPARM1": "value1",
"SSM_MYPARM2": "value2"
}
When the * .ps1 file is invoked, the values are read from Additional Arguments and can be used in the script.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.