feat: Добавлены скрипты для работы с сетью, системными утилитами и настройки Discord.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
# 🖥️ SYSTEM UTILS
|
||||
# ==========================================
|
||||
|
||||
|
||||
# --- СИСТЕМНАЯ ИНФОРМАЦИЯ ---
|
||||
|
||||
function Get-SystemInfo {
|
||||
@@ -11,6 +12,42 @@ function Get-SystemInfo {
|
||||
}
|
||||
}
|
||||
|
||||
function Ensure-VCRedist {
|
||||
Write-Info "Проверка Visual C++ Redistributable..."
|
||||
|
||||
# Check registry for VC++ 2015-2022 (x64)
|
||||
# Key: HKLM:\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64
|
||||
$regPath = "HKLM:\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64"
|
||||
if (Test-Path $regPath) {
|
||||
$installed = (Get-ItemProperty -Path $regPath).Installed
|
||||
if ($installed -eq 1) {
|
||||
Write-Success "Visual C++ Redistributable уже установлен."
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Write-Warning "Visual C++ Redistributable не найден. Устанавливаю..."
|
||||
|
||||
$vcUrl = "https://aka.ms/vs/17/release/vc_redist.x64.exe"
|
||||
$vcFile = "$env:TEMP\vc_redist.x64.exe"
|
||||
|
||||
if (Download-File -Url $vcUrl -Destination $vcFile) {
|
||||
Write-Step "Установка библиотек Visual C++..."
|
||||
$process = Start-Process -FilePath $vcFile -ArgumentList "/install", "/quiet", "/norestart" -PassThru -Wait
|
||||
|
||||
if ($process.ExitCode -eq 0 -or $process.ExitCode -eq 3010) {
|
||||
# 3010 = reboot required (usually works without immediate reboot)
|
||||
Write-Success "Библиотеки установлены!"
|
||||
}
|
||||
else {
|
||||
Write-Error "Ошибка установки VC++ (Код: $($process.ExitCode))"
|
||||
Write-Host " Попробуйте установить вручную: https://aka.ms/vs/17/release/vc_redist.x64.exe"
|
||||
}
|
||||
|
||||
Remove-Item $vcFile -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
}
|
||||
|
||||
# --- DOCKER ---
|
||||
|
||||
function Test-Docker {
|
||||
|
||||
Reference in New Issue
Block a user