Blue Flower

Instalační menu se může hodit, ať nehledáme plno SW na různých místech.

 

#Skript Instalační Menu
function Show-Menu
{
    param (
        [string]$Title = 'I N S T A L A C E  SW'
    )
    Clear-Host
    Write-Host -ForegroundColor green "==========================="
    Write-Host -ForegroundColor Cyan  "     $Title"
    Write-Host -ForegroundColor green "==========================="
    Write-Host
    Write-Host "1: SW1"
    Write-Host "2: SW2"
    Write-Host "3: SW3"
    Write-Host "4: SW4"
    Write-Host "5: SW5"
    Write-Host
    Write-Host "---------------------------"
    Write-Host "6: SW6"
    Write-Host "7: SW7"
    Write-Host
    Write-Host -ForegroundColor Yellow  "Q: Konec"
    Write-Host
}

do
 {
     Show-Menu
     $selection = Read-Host "Vyber instalaci"
     switch ($selection)
     {
         1 { Start-Process "\Adobe Reader\DC\AcroRdrDC1900820071_cs_CZ.exe" -ArgumentList "/qn EULA_ACCEPT=YES AgreeToLicense=Yes RebootYesNo=No /sAll" }
         2 { Start-Process "\PDFCreator\4.x\4.1.0\PDFCreator-4_1_0-Setup.exe" }
         3 { Start-Process "\VNC\UltraVNC\v1096_2\UltraVNC_1.0.9.6.2_Setup_32bit.exe" -ArgumentList "/silent /log -install -defaultsettings" }
         4 { Start-Process "7-Zip\7z1900-x64.exe" }
         5 { Start-Process "Edge\MicrosoftEdgeEnterpriseX64.msi" }
         6 { start-process -filepath C:\Users\$env:USERNAME\Desktop\Batch\Security_policy_All.cmd -verb RunAs }
         7 { start-process -filepath C:\Users\$env:USERNAME\Desktop\Batch\Security_policy_Sign.cmd -verb RunAs }
     }
     pause
 }
 until ($selection -eq 'q')