DISM-based offline installer for Windows 10 / 11 — sxs CAB files included, no internet required.
⚠️ 請從 GitHub Release 下載:NET35-Offline-Installer-v1.1-full.zip
- 到本頁右側 Releases → 最新版 → 下載
*.full.zip(已含DotNet35Setup.exe,完整可用) - 不要用頁面上方的 Code → Download ZIP:那是 git snapshot,不含
DotNet35Setup.exe(26H1 用),26H1+ 會缺少安裝檔 - 解壓縮
full.zip - 對
install.bat按右鍵 → 以系統管理員身分執行 - 完成!腳本會自動偵測 Windows 版本,選用對應方式安裝(sxs DISM 或 26H1 獨立安裝器)
完整包(
NET35-Offline-Installer-v1.1-full.zip)內容如下;Code → Download ZIP 不含DotNet35Setup.exe。
NET35-Offline-Installer/
├── install.bat ← 以系統管理員執行(自動偵測版本)
├── DotNet35Setup.exe ← 26H1 專用安裝器(僅 Release full.zip 提供)
├── build_offline_package.ps1 ← (選用) 從 Windows ISO 自訂抽取 sxs
├── README.md
├── Win10_22H2/sxs/ ← CAB 檔已內建
└── Win11_25H2/sxs/ ← CAB 檔已內建
Windows 安裝光碟的 sources\sxs 資料夾中已有 .NET 3.5 的 CAB 檔!
透過 DISM 指定本機 sxs 路徑即可離線啟用,完全不用連 Windows Update。
install.bat 會自動:
- 檢查 .NET 3.5 是否已安裝(已裝則跳過)
- 偵測目前 Windows 10 或 11
- 從對應版本的 sxs 資料夾離線啟用
- 若離線安裝失敗 → 自動 fallback 走 Windows Update
| 資料夾 | 來源 |
|---|---|
Win10_22H2/sxs/ |
Windows 10 22H2 (build 19045) |
Win11_25H2/sxs/ |
Windows 11 25H2 |
遇到版本不合時,
install.bat會自動轉 Windows Update,不影響安裝。
自 26H1 起,微軟已將 .NET 3.5 從 Windows 選用元件(FoD)移除,DISM /sxs 與 Windows Update 都無法再安裝,只能用微軟的獨立安裝器。
install.bat 偵測到 build ≥ 28000 時會自動改跑同資料夾內的 DotNet35Setup.exe
(靜默 /passive /norestart):
NET35-Offline-Installer/
├── install.bat
├── DotNet35Setup.exe ← 自行從微軟下載放入(約 100MB,repo 不收)
└── ...
下載點:https://go.microsoft.com/fwlink/?LinkID=2337635 (官方說明與 FAQ:Install .NET Framework 3.5 on Windows 11)
注意事項:
- 安裝成功後可能要求重新開機(exit code 3010)。
- 26H1 移除了 ASP.NET 3.5 等 IIS 相關元件,IIS 情境需另跑微軟的 Enable-ASPNet35.ps1。
- Windows 大版本升級後 .NET 3.5 不會保留,需重裝。
若想自己準備特定版本的 sxs:
以系統管理員執行 PowerShell:
.\build_offline_package.ps1- 自動掃描
Downloads中的Win*.iso - 自動掛載 → 偵測版本 → 複製 sxs
- 支援 Win10 / Win11 多版本
Q: DISM 報錯「找不到來源」? A: sxs 版本與 Windows 版本不合,腳本會自動轉 Windows Update 安裝。
Q: 可以放隨身碟嗎?
A: 可以。install.bat 使用相對路徑,放哪都能跑。
Q: 為什麼不用微軟的離線安裝包?
A: 微軟官方 NDP35.exe 僅支援舊版 Windows;Windows 10/11 需透過 DISM 啟用功能。
MIT