• msi通过powershell安装、卸载


    function install_msi($url) 
    {
      $telemetry = @{
        DisplayName = "Telemetry Service";
        filename = "TelemetryServiceInstaller_x64.msi"
        Url = $url
      }
      Write-Host $telemetry.Url
      Write-Host 'Install TelemetryService'
      Start-BitsTransfer $telemetry.Url "$env:temp$filename"
      $destination = "$env:temp"
      msiexec /i "$destinationTelemetryServiceInstaller_x64.msi" /norestart INSTALLSERVICE=1 /QUIET |out-null
      Write-Host "TelemetryService installed success!"
      
    }
    $url = "\10.63.32.243ShareTelemetryMaster Build113Releasex64TelemetryServiceInstaller_x64.msi"
    install_msi $url
    function unstall_msi($url) 
    {
      $telemetry = @{
        DisplayName = "Telemetry Service";
        filename = "TelemetryServiceInstaller_x64.msi"
        Url = $url
      }
      Write-Host $telemetry.Url
      Write-Host 'Unstall TelemetryService'
      Start-BitsTransfer $telemetry.Url "$env:temp$filename"
      $destination = "$env:temp"
      msiexec /uninstall "$destinationTelemetryServiceInstaller_x64.msi" /norestart INSTALLSERVICE=1 /QUIET |out-null
      Write-Host "TelemetryService unstalled success!"
      
    }
    $url = "\10.63.32.243ShareTelemetryMaster Build113Releasex64TelemetryServiceInstaller_x64.msi"
    unstall_msi $url
  • 相关阅读:
    030-B+树(三)
    028-B+树(一)
    027-B树(二)
    026-B树(一)
    025-红黑树(六)
    024-红黑树(五)
    023-红黑树(四)
    022-红黑树(三)
    021-红黑树(二)
    020-红黑树(一)
  • 原文地址:https://www.cnblogs.com/wt7018/p/11016272.html
Copyright © 2020-2023  润新知