Basic System Components Script by dimo70

dimo70

Администратор
Команда форума
✅ How it works:

  • The script automatically detects the folder where it is located.
  • It installs .NET 3.5 and Visual C++ Redistributables.
  • It runs DXSetup.exe from the DirectX12 folder in the same directory as the script.

✅ Как это работает:

  • Скрипт автоматически находит папку, в которой он находится.
  • Устанавливает .NET 3.5 и Visual C++ Redistributables.
  • Запускает DXSetup.exe из папки DirectX12 в той же директории, что и скрипт.

@echo off
SETLOCAL ENABLEDELAYEDEXPANSION

:: Temporary folder for downloads
set "TempFolder=%TEMP%\Installers"
if not exist "%TempFolder%" mkdir "%TempFolder%"

:: -----------------------------
:: Install .NET Framework 3.5
:: -----------------------------
echo Installing .NET Framework 3.5...
dism /online /Enable-Feature /FeatureName:NetFx3 /All /NoRestart
echo.
:: -----------------------------
:: Install Visual C++ Redist
:: -----------------------------
set "VCx64URL=https://aka.ms/vs/17/release/vc_redist.x64.exe"
set "VCx86URL=https://aka.ms/vs/17/release/vc_redist.x86.exe"
set "VCx64=%TempFolder%\vc_redist.x64.exe"
set "VCx86=%TempFolder%\vc_redist.x86.exe"

echo Downloading and installing VC++ x64...
powershell -Command "Invoke-WebRequest -Uri '%VCx64URL%' -OutFile '%VCx64%'"
"%VCx64%" /install /quiet /norestart

echo Downloading and installing VC++ x86...
powershell -Command "Invoke-WebRequest -Uri '%VCx86URL%' -OutFile '%VCx86%'"
"%VCx86%" /install /quiet /norestart
echo.
:: -----------------------------
:: Install DirectX from local folder
:: -----------------------------
set "DXFolder=%ScriptDir%DirectX12"
set "DXSetup=%DXFolder%\DXSetup.exe"

echo Installing DirectX 12...
"%DXSetup%" /silent
echo.
echo All installations completed. You may need to restart your computer.
timeout /t 5

SystemComponents - добавляет нужные системные компоненты для Windows 10,11

Для полной установки и поддержки Windows 7 можно пользоваться System software for Windows
 
Последнее редактирование:
Верх