Automation Issue
wkrouth
Posts: 3 New member
I've been trying to following the updateautomation guide for the most part. I'm not too savvy with powershell, but I've got the web msi installation part to work, just not the base msi. Anyone have an idea what is the problem? (redacting data connection info of course)
Downloading the SQLMonitor.exe, extracting the web msi from it, installing that, then extracting the base msi from the C:\Program Files\Red Gate\SQL Monitor\Web\wwwroot\Download\SQLMonitorBaseMonitorInstaller.exe all seem to work fine.
When this part of the script runs, msiexec justs pops up like you launched it without any arguments.
Downloading the SQLMonitor.exe, extracting the web msi from it, installing that, then extracting the base msi from the C:\Program Files\Red Gate\SQL Monitor\Web\wwwroot\Download\SQLMonitorBaseMonitorInstaller.exe all seem to work fine.
When this part of the script runs, msiexec justs pops up like you launched it without any arguments.
$MSIArguments = @(
"/i",
"SQLMonitor_BaseMonitor.msi",
"I_AGREE_TO_THE_EULA=yes",
"SERVICETYPE=local",
"SERVICETYPE=local",
"SERVICERPCPORTNUM=7399",
"DATACONNECTION=Data Source=**********;Initial Catalog=**********;User ID=**********;Password=**********;Max Pool Size=500;Connect Timeout=15;Encrypt=True;Trust Server Certificate=False;Packet Size=8000",
"/quiet",
"/norestart",
"/l*v .\Logs\SQLMonitor-Base-$DateStamp-log.txt"
)
# Step 2 - Change Directory to Base Monitor Directory
Set-Location "C:\Program Files\Red Gate\SQL Monitor\Automation\Downloads\Base"
Write-Host "Installing Base Monitor Service"
# Start msiexec with the arguments
Start-Process -FilePath "msiexec.exe" -ArgumentList $MSIArguments -Wait -NoNewWindow
Tagged:
Best Answer
-
Alex B Posts: 1,157 Diamond 4Hi @wkrouth
Righto, I think I've figured it out. The problem is the quoting around the data connection string. It needs to be single quotes on the outside with double quotes around the connection string itself.'DATACONNECTION="Data Source=**********,3342;Initial Catalog=**********;User ID=**********;Password=**********;Max Pool Size=500;Connect Timeout=15;Encrypt=True;Trust Server Certificate=False;Packet Size=8000"',
In both the unquoted and single inside double quoted example it was causing the mandatory DATACONNECTION parameter to be missed and that's what caused msiexec to pop up the window.
Please give that a try and let me know if it now works and I'll work on updating the documentation.
Kind regards,
Alex
Answers
It looks like you don't have the connection string enclosed in single quotes inside the double quotes. It should look like this with single quotes ' after the equal = sign and before the ending double quote ".
that is
Does that change the behavior?
Kind regards,
Alex
Have you visited our Help Center?
My current version of the script, with unfortunately the same result;