Reputation: 1
So I've got this super simple script that uses msiexec to install a MSI, but it doesn't take the one of the flags. This is the the format that installs correctly:
msiexec /qn /i "C:\temp\DNS_Agent_Setup.msi" NKEY="1234567890"
This script block fails because the NKEY likely isn't accepted:
param(
[String]$SITESECRETKEY
)
$key = "NKEY=`"$SITESECRETKEY`""
$msiPath = "C:\temp\DNS_Agent_Setup.msi"
Invoke-WebRequest -Uri "https://download.dnsfilter.com/User_Agent/Windows/DNS_Agent_Setup.msi" -OutFile $msiPath
msiexec /qn /i $msiPath $key
Am I just dense?
When I replaced $key with NKEY="123457890" in: msiexec /qn /i $msiPath $key
It works
Upvotes: 0
Views: 46