Jump to content

Finzsoft

Members
  • Content Count

    1
  • Joined

  • Last visited

  1. Finzsoft

    MSI with parameters

    I am trying to upgrade some software using PowerShell and I am not sure if my parameters are correctly formatted . See highlighted text # Silent Install Secure Secure Authentication # http://repository.eset.com/v1/com/eset/apps/business/esa/windows/v2/2.7.32.0/esa_nt64_enu.msi # Path for the workdir $workdir = "c:\scripts\" # Check if work directory exists if not create it If (Test-Path -Path $workdir -PathType Container) { Write-Host "$workdir already exists" -ForegroundColor Red} ELSE { New-Item -Path $workdir -ItemType directory } # Download the installer $source = "http://repository.eset.com/v1/com/eset/apps/business/esa/windows/v2/2.7.32.0/esa_nt64_enu.msi" $destination = "$workdir\esa_nt64_enu_v2.msi" # Check if Invoke-Webrequest exists otherwise execute WebClient if (Get-Command 'Invoke-Webrequest') { Invoke-WebRequest $source -OutFile $destination } else { $WebClient = New-Object System.Net.WebClient $webclient.DownloadFile($source, $destination) } Invoke-WebRequest $source -OutFile $destination # Start the installation msiexec.exe /i "$workdir\esa_nt64_enu_v2.msi" ADDLOCAL="Credential_Provider" /qb /L*v "c:\esa_install_log.txt" # Wait XX Seconds for the installation to finish Start-Sleep -s 35 # Remove the installer rm -Force $workdir\esa_nt64*
×