Write-Host "===================================================" -ForegroundColor Cyan Write-Host "Auto Installer by MIS PKL Smkn 1 Katapang" -ForegroundColor Yellow Write-Host "===================================================" -ForegroundColor Cyan Write-Host "Mengecek ketersediaan mesin Winget..." -ForegroundColor DarkCyan if (!(Get-Command winget -ErrorAction SilentlyContinue)) { Write-Host "Winget belum ada! Menginstal Winget secara otomatis (tanpa progress bar)..." -ForegroundColor Yellow $ProgressPreference = 'SilentlyContinue' $wingetUrl = "https://github.com/microsoft/winget-cli/releases/latest/download/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" $wingetPath = "$env:TEMP\winget.msixbundle" Invoke-WebRequest -Uri $wingetUrl -OutFile $wingetPath Add-AppxPackage -Path $wingetPath Remove-Item -Path $wingetPath -Force $ProgressPreference = 'Continue' Write-Host "Winget berhasil dipasang! Lanjut ke instalasi aplikasi..." -ForegroundColor Green } else { Write-Host "Winget sudah siap! Lanjut ke instalasi aplikasi..." -ForegroundColor Green } Write-Host "---------------------------------------------------" -ForegroundColor Cyan # --------------------------------------------------------------- $apps = @( "7zip.7zip", "Google.Chrome", "Mozilla.Firefox", "Mozilla.Thunderbird", "Adobe.Acrobat.Reader.64-bit", "Apache.OpenOffice", "Kingsoft.WPSOffice", "XP8BX2DWV7TF50" ) foreach ($app in $apps) { Write-Host "Menginstal $app via Winget..." -ForegroundColor Green winget install --id $app --exact --silent --accept-package-agreements --accept-source-agreements } Write-Host "===================================================" -ForegroundColor Cyan Write-Host "Menginstal Spark Messenger (Version 2.7.7)..." -ForegroundColor Yellow $urlSpark = "https://nekahost.com/installer/spark_2_7_7.exe" $tempPath = "$env:TEMP\spark_setup.exe" Write-Host "Mendownload file Spark dari server..." -ForegroundColor DarkCyan $ProgressPreference = 'SilentlyContinue' Invoke-WebRequest -Uri $urlSpark -OutFile $tempPath $ProgressPreference = 'Continue' Write-Host "Download Success! Running installation Spark..." -ForegroundColor DarkCyan Start-Process -FilePath $tempPath -ArgumentList "-q" -Wait -NoNewWindow Write-Host "Membersihkan file sampah installer..." -ForegroundColor DarkGray Remove-Item -Path $tempPath -Force Write-Host "===================================================" -ForegroundColor Cyan Write-Host "3. BAGIAN PENGATURAN SISTEM (Legacy Features)" -ForegroundColor Yellow Write-Host "===================================================" -ForegroundColor Cyan Write-Host "Mengaktifkan fitur SMB 1.0 Client... (Agak lama, harap tunggu)" -ForegroundColor DarkCyan Enable-WindowsOptionalFeature -Online -FeatureName "SMB1Protocol-Client" -All -NoRestart -WarningAction SilentlyContinue | Out-Null Write-Host "SMB 1.0 Client berhasil diaktifkan!" -ForegroundColor Green Write-Host "Menginstal fitur WMIC (Windows Management Instrumentation)..." -ForegroundColor DarkCyan Add-WindowsCapability -Online -Name "WMIC~~~~" -ErrorAction SilentlyContinue | Out-Null Write-Host "WMIC berhasil dipasang!" -ForegroundColor Green Write-Host "===================================================" -ForegroundColor Cyan Write-Host "SEMUA INSTALASI SELESAI" -ForegroundColor Yellow Write-Host "===================================================" -ForegroundColor Cyan