Created
November 15, 2025 10:43
-
-
Save ribas89/7ab92af6768be010a60e97a31061b817 to your computer and use it in GitHub Desktop.
bat to install net 3.5 on windows 10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| echo. | |
| echo === .NET Framework 3.5 Offline Installer === | |
| echo. | |
| set "found=" | |
| for /f "skip=1 tokens=1" %%D in ('wmic logicaldisk get name') do ( | |
| if exist "%%D\sources\sxs" ( | |
| set "found=%%D" | |
| goto :found | |
| ) | |
| ) | |
| :found | |
| if not defined found ( | |
| echo Error: Could not find a drive containing \sources\sxs | |
| echo Please insert Windows installation media and try again. | |
| pause | |
| exit /b 1 | |
| ) | |
| echo Found installation media at %found% | |
| set "source=%found%\sources\sxs" | |
| echo Installing .NET Framework 3.5 from "%source%"... | |
| echo. | |
| dism /online /enable-feature /featurename:NetFX3 /All /Source:%source% /LimitAccess | |
| echo. | |
| echo Installation complete (or check messages above for errors). | |
| pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment