question

test-4661 avatar image
0 Votes"
test-4661 asked IanXue-MSFT edited

Install Varigence BIMl software 32 and 64 at one go through powershell

I would like to install as part of requirement varigent Biml studio software on windows server 2019 through powershell. i have devloped the below script to download and install on go, but it does not install the required build target files, could some one help me to install all the required packages

$ErrorActionPreference = 'Stop';
$val = C:\Users\v-dbillakurt\Downloads\common\common\CloudTest-Common.ps1


function log([string]$message) {
Write-Host "[$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')] $message";
}


function DownloadFile ($fileUrl, $downloadFileName, [bool]$useBitsTransfer=$false) { # use false, as BitsTransfer not supported in 1ES Image Factory
$downloadFilePath="C:\Common\$downloadFileName";
log "Download [$fileUrl]->[$downloadFilePath];";
if([IO.File]::Exists($downloadFilePath) -and "$env:ForceDownloadFile" -ne 'true') {
log "Download skipped. File exists. set ForceDownloadFile=true to force download";
return $downloadFilePath;
}
$start_time = Get-Date;
if($useBitsTransfer) {
Import-Module BitsTransfer;
Start-BitsTransfer -Source $fileUrl -Destination $downloadFilePath -RetryInterval 60 -RetryTimeout 180;
}
else {
(New-Object System.Net.WebClient).DownloadFile($fileUrl, $downloadFilePath);
}
log "Download completed. Time taken: $((Get-Date).Subtract($start_time).Seconds) second(s);";
return $downloadFilePath;
}

function Install-BIML {
$url = "https://varigence.com/downloads/bimlstudiosetup.exe";

 # Downloads SQL BIML to temp dir
 $file = DownloadFile $url 'bimlstudiosetup.exe';
 $logFile = "C:\Common\BIML-install-$((New-Guid).Guid).log";
 #$arguments = "/bimlstudiosetup.exe -s -InstallFeature:BimlStudio_X64/install /quiet /norestart /log $logFile";
 #$arguments = ".\bimlstudiosetup.exe -s -WixBundleProviderKey 46a2e90b-6027-4c68-91b3-55ee468461d1 -InstallFeature:BimlStudio_X64/install /quiet /norestart /log $logFile";
 $arguments = "start /wait bimlstudiosetup.exe -s -InstallFeature:BimlStudio_X64";
  #$arguments = "/install INSTALLALL /quiet /norestart /log $logFile";

    

    
 # install BIML
 Write-Host 'Installing BIML';
 Write-Host "Command: $file $arguments";
  $process = Start-Process $file -ArgumentList $arguments -Wait -NoNewWindow -passthru;
  Write-host "Done!" -f Green
 $exitCode = $process.ExitCode

     if ($exitCode -eq 0 -or $exitCode -eq 3010)
     {
         Write-Host -Object 'Installation successful'
         return $exitCode
     }
     else
     {
         Write-Host -Object "Non zero exit code returned by the installation process : $exitCode."
         exit $exitCode
     }
 # display logs
 if([IO.File]::Exists($logFile)) { $logs = [IO.File]::ReadAllText($logFile); }

 if(!$logs -or !$logs.Contains('All specified components have been installed successfully') -or !$logs.Contains('Exit code: 0x0')) {
     if($logs) { 
         $logsTrimmed = $logs.Substring([Math]::Max($logs.Length - 30000, 0));
     }
     Write-Host "---------------- Trimmed logs ---------------- : $logsTrimmed";
     throw 'setup was not successful';
 }

 Write-Host "Install Done.";

}

Install-BIML;

not-supported
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered

Hi @test-4661

Since Varigent Biml is a 3rd Party software for Microsoft, it would be recommended that you get in touch with a forum or community of the software manufacturers, where the experts would be more experienced about the deployment requirements and exposed to similar situations as you want to achieve.

Hope this helps with your query,


--If the reply is helpful, please Upvote and Accept as answer--

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.