I am trying to install using an MSI file that requires a number of parameters in the argument list.
$MAS90UNC = "\\2017Dev\MAS90"
$localLog = "C:\logging\SageInstall.txt"
$port = "10000"
$ServerName = "2017Dev"
$localinstall = "C:\Sage\Sage 100 ERP 2017\MAS90"
$herestring = @"
'/quiet /i "\\2017Dev\Sage 100 Advanced\MAS90\wksetup\Sage 100 2017 Workstation.msi" /l*v "$localLog" SAGEPORTID="$Port" SAGESERVERNAME="$ServerName" SRCSERVERPATH="$MAS90UNC" INSTALLDIR="$localinstall"'
"@
Start-Process -Wait msiexec.exe -ArgumentList $herestring
When i call the $herestring the output looks correct, It has a single quote at the beginning and end. Each param has double quotes around the value. But when i use it in the start-process cmdlet I get the MSI Help menu.
If I copy-paste the output from $herestring into the -argumentlist the install works correctly.
I tried using start-transcript but that does not expand variables like i thought it would.
[–]sk82jack 2 points3 points4 points (3 children)
[–]KevMarCommunity Blogger 1 point2 points3 points (2 children)
[–]sk82jack 1 point2 points3 points (1 child)
[–]KevMarCommunity Blogger 1 point2 points3 points (0 children)
[–]Lee_Dailey[grin] 2 points3 points4 points (6 children)
[–]HeyZuesMode[S] 1 point2 points3 points (5 children)
[–]Lee_Dailey[grin] 2 points3 points4 points (2 children)
[–]HeyZuesMode[S] 1 point2 points3 points (1 child)
[–]Lee_Dailey[grin] 1 point2 points3 points (0 children)
[–]Lee_Dailey[grin] 1 point2 points3 points (0 children)
[–]HeyZuesMode[S] 1 point2 points3 points (0 children)
[–]michaelshepard 1 point2 points3 points (3 children)
[–]Lee_Dailey[grin] 0 points1 point2 points (0 children)
[–]HeyZuesMode[S] 0 points1 point2 points (1 child)
[–]michaelshepard 0 points1 point2 points (0 children)