Не удается установить WebSphere setup.exe с помощью PowerShell - PullRequest
0 голосов
/ 11 ноября 2019

Используя приведенный ниже код, я могу загрузить zip-файл из Интернета, затем разархивировать его в папку, а затем перейти в папку Windows → setup.exe. Я могу дважды щелкнуть setup.exe, но не могу выполнить автоматическую установку или нажать кнопку OK / Далее в интерфейсе установки.

image

Код PowerShell:

if ($installationItem.FeatureName -match "WebSphere-Features") {
    # if software directory not exists then create it
    if (!(Test-Path $installationItem.FolderPath)) {
          New-Item -ItemType Directory -Force -Path $installationItem.FolderPath | Out-Null
    }

    Write-Host "Downloading WebSphere... "

    $client.DownloadFile($installationItem.Source, $installationItem.FilePath)
    if (!(Test-Path $installationItem.FilePath)) {
        Write-Host "Downloading $installationItem.FilePath failed"
        return
    }

    Expand-Archive -Force -Path $installationItem.FilePath -DestinationPath  $installationItem.FolderPath
    # check if websphere already installed
    if (Test-Path $installationItem.Test_Path) {
        Write-Host 'Websphere Already Installed ..Skipping installtion of websphere.'
        return
    } else {
        # Provide full access to the executable file to run
        Unblock-File -Path $installationItem.FilePath1

        # process installation
        $proc1 = Start-Process -FilePath $installationItem.FilePath1 -ArgumentList "/s /v /qn REBOOT=ReallySuppress" -Wait -PassThru -Verb "RunAs"

        $proc1.WaitForExit()

setting.xml:

<?xml version="1.0"?>
<InstallationManagement>
    <Installation Name="WebSphere" FeatureName="WebSphere-Features" Source="https://path/ibm_webshpere-1.zip" FolderPath="C:\softwares\websphere" FilePath="C:\softwares\ibm_webshpere-1.zip" FilePath1="C:\softwares\websphere\Windows\Setup.exe" Test_Path="C:\Program Files\webshpere"></Installation>   
</InstallationManagement>

Пожалуйста, помогите в тихой установке websphere или взаимодействии с интерфейсом окна установки.

...