Hướng dẫn tạo Batch script gỡ bỏ gói package mặc định của Windows 10, Version 1703
Nếu bạn muốn gỡ bỏ nhanh một ứng dụng hoặc tính năng của hệ thống nào đó trong Windows 10, Version 1703 bạn có thể tạo trước tập tin Batch trong đó được lưu những kịch bản được tạo trước và cho phép lựa chọn ứng dụng hoặc tính năng muốn gỡ. Các bước thực hiên như sau:
Bước 1: Trước tiên bạn cần tải phần mềm SetACL tại địa chỉ https://yadi.sk/d/nMQ3fi0_3JojuN và copy vào đường dẫn c:\windows\system32.
Bước 2: Tiếp theo mở trình soạn thảo Notepad copy đoạn code bên dưới vào.
Batch-script
:: Name : Remove-Package.cmd :: Author : Nguyen Tuan. :: Website : www.diachinhcongtrinh.com :: ------------------------------------------------------------------------------------ :Settings chcp 65001 >nul @echo off title Remove-Package Tool mode con: cols=120 lines=32 color 3f chcp 65001 >nul cd /d %~dp0 cls >nul 2>&1 "%systemroot%\system32\cacls.exe" "%systemroot%\system32\config\system" if "%errorlevel%" NEQ "0" ( echo: Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs" echo: UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs" "%temp%\getadmin.vbs" & exit ) if exist "%temp%\getadmin.vbs" del /f /q "%temp%\getadmin.vbs" :: ------------------------------------------------------------------------------------ :: ------------------------------------------------------------------------------------ :Version cls ver | findstr /i "10\.0\.10240" if %ERRORLEVEL% EQU 0 ( echo.Máy tính bạn đang chạy Windows 10, Version 1507. echo.Tùy chọn này chỉ được hỗ trợ cho Windows 10, Version 1703. pause ) ver | findstr /i "10\.0\.10586" if %ERRORLEVEL% EQU 0 ( echo Máy tính bạn đang chạy Windows 10, Version 1511. echo.Tùy chọn này chỉ được hỗ trợ cho Windows 10, Version 1703. pause ) ver | findstr /i "10\.0\.14393" if %ERRORLEVEL% EQU 0 ( echo Máy tính bạn đang chạy Windows 10, Version 1607. echo.Tùy chọn này chỉ được hỗ trợ cho Windows 10, Version 1703. pause ) ver | findstr /i "10\.0\.15063" if %ERRORLEVEL% EQU 0 ( cls set Packages=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages SetACL -on "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages" -ot reg -actn setowner -ownr "n:%USERDOMAIN%\%USERNAME%" SetACL -on "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\Packages" -ot reg -actn ace -ace "n:%USERDOMAIN%\%USERNAME%;p:full" goto Remove-Package ) :: ------------------------------------------------------------------------------------ :: ------------------------------------------------------------------------------------ :Remove-Package cls echo.Gỡ bỏ gói tính năng hệ thống echo. echo.ID Tùy chọn ID Tùy chọn echo. echo.1 Connect 19 Media Features echo.2 Cortana 20 Microsoft Message Queue (MSMQ) Server echo.3 Get Help 21 Microsoft Print to PDF echo.4 Microsoft Edge 22 MultiPoint Connector echo.5 Mixed Reality Portal 23 Print and Document Services echo.6 OneDrive 24 RAS Connection Manager Adminitration Kit (CMAK) echo.7 Quick Assist 25 Remove Differential Compression API Support echo.8 Windows Defender 26 RIP Listener echo.9 Windows Spotlight 27 Services for NFS echo.10 Windows Photo Viewer 28 Simple Network Management Protocol (SNMP) echo.11 Snipping Tool 29 Simple TCPIP services (i.e. echo daytime etc) echo.12 Active Directory 30 SMB 1.0/CIFS File Sharing Support echo.13 Containers 31 Telnet-TFTP Client echo.14 Assigned Access 32 Windows Identify Foundation 3.5 echo.15 Device Lockdown 33 Windows Powershell 2.0 echo.16 Hyper-V 34 Windows TIFF IFilter echo.17 Internet Explorer 35 XPS Services echo.18 Legacy Components 36 XPS Viewer echo. set /p option=Chọn ID và nhấn Enter : if %option% EQU 1 ( call :Connect ) else if %option% EQU 2 ( call :Cortana ) else if %option% EQU 3 ( call :GetHelp ) else if %option% EQU 4 ( goto MicrosoftEdge ) else if %option% EQU 5 ( goto MixedRealityPortal ) else if %option% EQU 6 ( goto OneDrive ) else if %option% EQU 7 ( goto QuickAssist ) else if %option% EQU 8 ( goto WindowsDefender ) else if %option% EQU 9 ( goto WindowsSpotlight ) else if %option% EQU 10 ( goto PhotoViewer ) else if %option% EQU 11 ( goto SnippingTool ) else if %option% EQU 12 ( goto ActiveDirectory ) else if %option% EQU 13 ( goto Containers ) else if %option% EQU 14 ( goto AssignedAccess ) else if %option% EQU 15 ( goto DeviceLockdown ) else if %option% EQU 16 ( goto Hyper-V ) else if %option% EQU 17 ( goto InternetExplorer11 ) else if %option% EQU 18 ( goto LegacyComponents ) else if %option% EQU 19 ( goto MediaFeatures ) else if %option% EQU 20 ( goto MessageQueue ) else if %option% EQU 21 ( goto PrinttoPDF ) else if %option% EQU 22 ( goto MultiPointConnector ) else if %option% EQU 23 ( goto PrintandDocument ) else if %option% EQU 24 ( goto RASConnectionManager ) else if %option% EQU 25 ( goto DifferentialCompressionAPI ) else if %option% EQU 26 ( goto RIPListener ) else if %option% EQU 27 ( goto ServicesforNFS ) else if %option% EQU 28 ( goto SimpleNetwork ) else if %option% EQU 29 ( goto SimpleTCPIP ) else if %option% EQU 30 ( goto FileSharingSupport ) else if %option% EQU 31 ( goto TelnetClient ) else if %option% EQU 32 ( goto IdentifyFoundation ) else if %option% EQU 33 ( goto Powershell2.0 ) else if %option% EQU 34 ( goto TIFFIFilter ) else if %option% EQU 35 ( goto XPSServices ) else if %option% EQU 36 ( goto XPSViewer ) else if %option% EQU 37 ( goto Menu ) else ( goto Remove-Package ) :: ------------------------------------------------------------------------------------ :Connect cls choice /c YN /n /m "CẢNH BÁO: Ứng dụng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-Connect if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-Connect cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-PPIProjection-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-PPIProjection-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-PPIProjection-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-PPIProjection-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package : ------------------------------------------------------------------------------------ :Cortana cls choice /c YN /n /m "CẢNH BÁO: Ứng dụng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-Cortana if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-Cortana cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-Cortana-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Cortana-PAL-Desktop-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Cortana-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /Remove-Package /packagename:Microsoft-Windows-Cortana-PAL-Desktop-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-Cortana-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Cortana-PAL-Desktop-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Cortana-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /Remove-Package /packagename:Microsoft-Windows-Cortana-PAL-Desktop-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. echo.Windows cần được khởi động lại để hoàn tất hoạt động này. choice /c YN /n /m "Bạn có muốn khởi động máy tính ngay bây giờ? (Yes/No) " if %errorlevel% EQU 1 goto Restart if %errorlevel% EQU 2 goto Remove-Package : ------------------------------------------------------------------------------------ :GetHelp cls choice /c YN /n /m "CẢNH BÁO: Ứng dụng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-ContactSupport if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-ContactSupport cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-ContactSupport-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-ContactSupport-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-ContactSupport-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-ContactSupport-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package : ------------------------------------------------------------------------------------ :MicrosoftEdge cls choice /c YN /n /m "CẢNH BÁO: Ứng dụng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-MicrosoftEdge if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-MicrosoftEdge cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-Internet-Browser-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Internet-Browser-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-Internet-Browser-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Internet-Browser-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package : ------------------------------------------------------------------------------------ :MixedRealityPortal cls choice /c YN /n /m "CẢNH BÁO: Ứng dụng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-MixedRealityPortal if %errorlevel% EQU 2 goto Menu : -------------------------------------------------- :Remove-MixedRealityPortal cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-Holographic-Desktop-Analog-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Holographic-Desktop-Merged-analog-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Holographic-Desktop-Merged-onecoreuap-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Holographic-Desktop-Merged-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Holographic-Desktop-Merged-WOW64-analog-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Holographic-Desktop-Merged-WOW64-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Holographic-Desktop-Analog-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Holographic-Desktop-Merged-analog-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Holographic-Desktop-Merged-onecoreuap-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Holographic-Desktop-Merged-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Holographic-Desktop-Merged-WOW64-analog-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Holographic-Desktop-Merged-WOW64-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart takeown /f "%SystemRoot%\SystemApps\Microsoft.Windows.HolographicFirstRun_cw5n1h2txyewy" icacls "%SystemRoot%\SystemApps\Microsoft.Windows.HolographicFirstRun_cw5n1h2txyewy" /grant %username%:F rd /s /q "%SystemRoot%\SystemApps\Microsoft.Windows.HolographicFirstRun_cw5n1h2txyewy" cls echo.Hoạt động được hoàn tất thành công. echo.Windows cần được khởi động lại để hoàn tất hoạt động này. choice /c YN /n /m "Bạn có muốn khởi động máy tính ngay bây giờ? (Yes/No) " if %errorlevel% EQU 1 goto Restart if %errorlevel% EQU 2 goto Remove-Package ) ELSE ( cls echo.Máy tính đang cài đặt Windows phiên bản 32-bit, Ứng dụng này chỉ có trong phiên bản 64-bit. pause goto Remove-Package ) : ------------------------------------------------------------------------------------ :OneDrive cls choice /c YN /n /m "CẢNH BÁO: Ứng dụng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-OneDrive if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-OneDrive cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( taskkill /f /im OneDrive.exe start /wait %systemroot%\SysWOW64\OneDriveSetup.exe /uninstall reg delete "%Packages%\Microsoft-Windows-OneDrive-Setup-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f reg delete "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f dism /online /remove-package /packagename:Microsoft-Windows-OneDrive-Setup-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( taskkill /f /im OneDrive.exe start /wait %systemroot%\System32\OneDriveSetup.exe /uninstall reg delete "%Packages%\Microsoft-Windows-OneDrive-Setup-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f dism /online /remove-package /packagename:Microsoft-Windows-OneDrive-Setup-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package : ------------------------------------------------------------------------------------ :QuickAssist cls choice /c YN /n /m "CẢNH BÁO: Ứng dụng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-QuickAssist if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-QuickAssist cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-QuickAssist-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-QuickAssist-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-QuickAssist-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-QuickAssist-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package : ------------------------------------------------------------------------------------ :WindowsDefender cls choice /c YN /n /m "CẢNH BÁO: Ứng dụng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-WindowsDefender if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-WindowsDefender cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v SettingsPageVisibility /t REG_SZ /d "hide:windowsdefender" /f reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.SecurityAndMaintenance" /v Enabled /t REG_DWORD /d 0 /f reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v SecurityHealth /f reg delete "%Packages%\Windows-Defender-AM-Default-Definitions-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Windows-Defender-AppLayer-Group-amcore-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Windows-Defender-AppLayer-Group-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Windows-Defender-AppLayer-Group-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Windows-Defender-ApplicationGuard-Inbox-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Windows-Defender-Client-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Windows-Defender-Group-Policy-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Windows-Shield-Provider-Core-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Windows-Defender-AM-Default-Definitions-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Windows-Defender-AppLayer-Group-amcore-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Windows-Defender-AppLayer-Group-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Windows-Defender-AppLayer-Group-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Windows-Defender-ApplicationGuard-Inbox-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Windows-Defender-Client-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Windows-Defender-Group-Policy-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Windows-Shield-Provider-Core-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart takeown /f "%SystemRoot%\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy" takeown /f "%SystemRoot%\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy\Assets" takeown /f "%SystemRoot%\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy\pris" icacls "%SystemRoot%\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy" /grant %username%:F icacls "%SystemRoot%\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy\Assets" /grant %username%:F icacls "%SystemRoot%\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy\pris" /grant %username%:F rd /s /q "%SystemRoot%\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy" ) ELSE ( reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v SettingsPageVisibility /t REG_SZ /d "hide:windowsdefender" /f reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings\Windows.SystemToast.SecurityAndMaintenance" /v Enabled /t REG_DWORD /d 0 /f reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" /v SecurityHealth /f reg delete "%Packages%\Windows-Defender-AM-Default-Definitions-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Windows-Defender-AppLayer-Group-amcore-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Windows-Defender-AppLayer-Group-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Windows-Defender-AppLayer-Group-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Windows-Defender-ApplicationGuard-Inbox-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Windows-Defender-Client-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Windows-Defender-Group-Policy-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Windows-Shield-Provider-Core-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Windows-Defender-AM-Default-Definitions-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Windows-Defender-AppLayer-Group-amcore-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Windows-Defender-AppLayer-Group-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Windows-Defender-AppLayer-Group-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Windows-Defender-ApplicationGuard-Inbox-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Windows-Defender-Client-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Windows-Defender-Group-Policy-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Windows-Shield-Provider-Core-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart takeown /f "%SystemRoot%\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy" takeown /f "%SystemRoot%\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy\Assets" takeown /f "%SystemRoot%\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy\pris" icacls "%SystemRoot%\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy" /grant %username%:F icacls "%SystemRoot%\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy\Assets" /grant %username%:F icacls "%SystemRoot%\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy\pris" /grant %username%:F rd /s /q "%SystemRoot%\SystemApps\Microsoft.Windows.SecHealthUI_cw5n1h2txyewy" ) cls echo.Hoạt động được hoàn tất thành công. echo.Hướng dẫn xóa biểu tượng Windows Defender Security Center trong Start menu. echo Xem chi tiết tại địa chỉ https://goo.gl/8HtNsc echo.Windows cần được khởi động lại để hoàn tất hoạt động này. choice /c YN /n /m "Bạn có muốn khởi động máy tính ngay bây giờ? (Yes/No) " if %errorlevel% EQU 1 goto Restart if %errorlevel% EQU 2 goto Remove-Package :: ------------------------------------------------------------------------------------ :WindowsSpotlight cls choice /c YN /n /m "CẢNH BÁO: Ứng dụng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-WindowsSpotlight if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-WindowsSpotlight cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-ContentDeliveryManager-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-ContentDeliveryManager-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-ContentDeliveryManager-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-ContentDeliveryManager-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :PhotoViewer cls choice /c YN /n /m "CẢNH BÁO: Ứng dụng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-PhotoViewer if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-PhotoViewer cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-PhotoBasicPackage~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-PhotoBasicPackage~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-PhotoBasicPackage~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-PhotoBasicPackage~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :SnippingTool cls choice /c YN /n /m "CẢNH BÁO: Ứng dụng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-SnippingTool if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-SnippingTool cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-SnippingTool-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-SnippingTool-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-SnippingTool-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-SnippingTool-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :ActiveDirectory cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-ActiveDirectory if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-ActiveDirectory cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-DirectoryServices-ADAM-Client-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-DirectoryServices-ADAM-Client-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-DirectoryServices-ADAM-Client-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-DirectoryServices-ADAM-Client-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :Containers cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-Containers if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-Containers cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-OneCore-Containers-Opt-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-OneCore-Containers-Opt-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-OneCore-Containers-Opt-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-OneCore-Containers-Opt-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :AssignedAccess cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-AssignedAccess if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-AssignedAccess cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-Client-AssignedAccess-base-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Client-AssignedAccess-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Client-AssignedAccess-base-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Client-AssignedAccess-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-Client-AssignedAccess-base-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Client-AssignedAccess-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Client-AssignedAccess-base-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Client-AssignedAccess-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. echo.Windows cần được khởi động lại để hoàn tất hoạt động này. choice /c YN /n /m "Bạn có muốn khởi động máy tính ngay bây giờ? (Yes/No) " if %errorlevel% EQU 1 goto Restart if %errorlevel% EQU 2 goto Remove-Package :: ------------------------------------------------------------------------------------ :DeviceLockdown cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-DeviceLockdown if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-DeviceLockdown cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-Embedded-BootExp-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Embedded-EmbeddedLogon-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Embedded-KeyboardFilter-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Embedded-ShellLauncher-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Embedded-UnifiedWriteFilter-Merged-base-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Embedded-UnifiedWriteFilter-Merged-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Embedded-UnifiedWriteFilter-Merged-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Client-EmbeddedExp-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Client-ShellLauncher-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Embedded-BootExp-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Embedded-EmbeddedLogon-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Embedded-KeyboardFilter-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Embedded-ShellLauncher-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Embedded-UnifiedWriteFilter-Merged-base-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Embedded-UnifiedWriteFilter-Merged-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Embedded-UnifiedWriteFilter-Merged-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Client-EmbeddedExp-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Client-ShellLauncher-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-Embedded-BootExp-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Embedded-EmbeddedLogon-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Embedded-KeyboardFilter-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Embedded-ShellLauncher-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Embedded-UnifiedWriteFilter-Merged-base-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Embedded-UnifiedWriteFilter-Merged-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Embedded-UnifiedWriteFilter-Merged-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Client-EmbeddedExp-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Client-ShellLauncher-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Embedded-BootExp-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Embedded-EmbeddedLogon-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Embedded-KeyboardFilter-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Embedded-ShellLauncher-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Embedded-UnifiedWriteFilter-Merged-base-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Embedded-UnifiedWriteFilter-Merged-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Embedded-UnifiedWriteFilter-Merged-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Client-EmbeddedExp-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Client-ShellLauncher-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. echo.Windows cần được khởi động lại để hoàn tất hoạt động này. choice /c YN /n /m "Bạn có muốn khởi động máy tính ngay bây giờ? (Yes/No) " if %errorlevel% EQU 1 goto Restart if %errorlevel% EQU 2 goto Remove-Package :: ------------------------------------------------------------------------------------ :Hyper-V cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-Hyper-V if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-Hyper-V cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\HyperV-Guest-DynamicMemory-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Heartbeat-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Heartbeat-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-IcSvcExt-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-IcSvcExt-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-KMCL-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-KvpExchange-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-KvpExchange-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Networking-Emulated-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Networking-SrIov-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Networking-SrIov-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-RemoteFx-onecoreuap-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-RemoteFx-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Shutdown-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Shutdown-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Storage-Filter-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Storage-Filter-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Storage-Synthetic-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Storage-Synthetic-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-TimeSync-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-TimeSync-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-VmBus-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-VmBus-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-HvSocket-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Storage-VHD-Drivers-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Storage-VHD-Drivers-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Hyper-V-ClientEdition-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-HyperV-Guest-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-HyperV-Guest-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:HyperV-Guest-DynamicMemory-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Heartbeat-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Heartbeat-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-IcSvcExt-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-IcSvcExt-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-KMCL-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-KvpExchange-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-KvpExchange-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Networking-Emulated-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Networking-SrIov-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Networking-SrIov-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-RemoteFx-onecoreuap-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-RemoteFx-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Shutdown-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Shutdown-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Storage-Filter-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Storage-Filter-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Storage-Synthetic-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Storage-Synthetic-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-TimeSync-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-TimeSync-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-VmBus-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-VmBus-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-HvSocket-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Storage-VHD-Drivers-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Storage-VHD-Drivers-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Hyper-V-ClientEdition-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-HyperV-Guest-onecore-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-HyperV-Guest-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\HyperV-Guest-DynamicMemory-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Heartbeat-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Heartbeat-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-IcSvcExt-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-IcSvcExt-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-KMCL-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-KvpExchange-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-KvpExchange-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Networking-Emulated-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Networking-SrIov-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Networking-SrIov-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-RemoteFx-onecoreuap-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-RemoteFx-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Shutdown-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Shutdown-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Storage-Filter-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Storage-Filter-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Storage-Synthetic-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-Storage-Synthetic-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-TimeSync-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-TimeSync-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-VmBus-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Guest-VmBus-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-HvSocket-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Storage-VHD-Drivers-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\HyperV-Storage-VHD-Drivers-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Hyper-V-ClientEdition-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-HyperV-Guest-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-HyperV-Guest-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:HyperV-Guest-DynamicMemory-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Heartbeat-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Heartbeat-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-IcSvcExt-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-IcSvcExt-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-KMCL-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-KvpExchange-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-KvpExchange-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Networking-Emulated-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Networking-SrIov-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Networking-SrIov-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-RemoteFx-onecoreuap-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-RemoteFx-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Shutdown-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Shutdown-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Storage-Filter-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Storage-Filter-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Storage-Synthetic-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-Storage-Synthetic-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-TimeSync-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-TimeSync-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-VmBus-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Guest-VmBus-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-HvSocket-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Storage-VHD-Drivers-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:HyperV-Storage-VHD-Drivers-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Hyper-V-ClientEdition-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-HyperV-Guest-onecore-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-HyperV-Guest-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. echo.Windows cần được khởi động lại để hoàn tất hoạt động này. choice /c YN /n /m "Bạn có muốn khởi động máy tính ngay bây giờ? (Yes/No) " if %errorlevel% EQU 1 goto Restart if %errorlevel% EQU 2 goto Remove-Package :: ------------------------------------------------------------------------------------ :InternetExplorer11 cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-InternetExplorer11 if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-InternetExplorer11 cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-InternetExplorer-Optional-Package~31bf3856ad364e35~amd64~~11.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-InternetExplorer-Package~31bf3856ad364e35~amd64~~11.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-InternetExplorer-Optional-Package~31bf3856ad364e35~amd64~~11.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-InternetExplorer-Package~31bf3856ad364e35~amd64~~11.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-InternetExplorer-Optional-Package~31bf3856ad364e35~x86~~11.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-InternetExplorer-Package~31bf3856ad364e35~x86~~11.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-InternetExplorer-Optional-Package~31bf3856ad364e35~x86~~11.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-InternetExplorer-Package~31bf3856ad364e35~x86~~11.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :LegacyComponents cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-LegacyComponents if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-LegacyComponents cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-Legacy-Components-OC-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Legacy-Components-OC-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-Legacy-Components-OC-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Legacy-Components-OC-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :MediaFeatures cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-MediaFeatures if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-MediaFeatures cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-MediaPlayback-OC-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-MediaPlayback-OC-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-MediaPlayback-OC-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-MediaPlayback-OC-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. echo.Windows cần được khởi động lại để hoàn tất hoạt động này. choice /c YN /n /m "Bạn có muốn khởi động máy tính ngay bây giờ? (Yes/No) " if %errorlevel% EQU 1 goto Restart if %errorlevel% EQU 2 goto Remove-Package :: ------------------------------------------------------------------------------------ :MessageQueue cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-MessageQueue if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-MessageQueue cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-COM-MSMQ-package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-MSMQ-Client-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-COM-MSMQ-package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-MSMQ-Client-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-COM-MSMQ-package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-MSMQ-Client-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-COM-MSMQ-package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-MSMQ-Client-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :PrinttoPDF cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-PrinttoPDF if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-PrinttoPDF cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-Printing-PrintToPDFServices-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Printing-PrintToPDFServices-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-Printing-PrintToPDFServices-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Printing-PrintToPDFServices-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :MultiPointConnector cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-MultiPointConnector if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-MultiPointConnector cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-MultiPoint-Connector-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-MultiPoint-Connector-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-MultiPoint-Connector-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-MultiPoint-Connector-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :PrintandDocument cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-PrintandDocument if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-PrintandDocument cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-Printer-Drivers-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Printing-Foundation-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Printing-LocalPrinting-Enterprise-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Printing-LocalPrinting-Home-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Printing-PremiumTools-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Printer-Drivers-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Printing-Foundation-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Printing-LocalPrinting-Enterprise-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Printing-LocalPrinting-Home-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Printing-PremiumTools-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-Printer-Drivers-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Printing-Foundation-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Printing-LocalPrinting-Enterprise-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Printing-LocalPrinting-Home-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-Printing-PremiumTools-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Printer-Drivers-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Printing-Foundation-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Printing-LocalPrinting-Enterprise-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Printing-LocalPrinting-Home-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-Printing-PremiumTools-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. echo.Windows cần được khởi động lại để hoàn tất hoạt động này. choice /c YN /n /m "Bạn có muốn khởi động máy tính ngay bây giờ? (Yes/No) " if %errorlevel% EQU 1 goto Restart if %errorlevel% EQU 2 goto Remove-Package :: ------------------------------------------------------------------------------------ :RASConnectionManager cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-RASConnectionManager if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-RASConnectionManager cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-RasCMAK-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-RasCMAK-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-RasCMAK-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-RasCMAK-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :DifferentialCompressionAPI cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-DifferentialCompressionAPI if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-DifferentialCompressionAPI cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-RDC-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-RDC-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-RDC-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-RDC-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :RIPListener cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-RIPListener if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-RIPListener cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-RasRip-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-RasRip-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-RasRip-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-RasRip-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :ServicesforNFS cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-ServicesforNFS if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-ServicesforNFS cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-NFS-ClientSKU-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-NFS-ClientSKU-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-NFS-ClientSKU-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-NFS-ClientSKU-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :SimpleNetwork cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-SimpleNetwork if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-SimpleNetwork cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-SNMP-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-WMI-SNMP-Provider-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-SNMP-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-WMI-SNMP-Provider-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-SNMP-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-WMI-SNMP-Provider-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-SNMP-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-WMI-SNMP-Provider-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :SimpleTCPIP cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-SimpleTCPIP if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-SimpleTCPIP cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-SimpleTCP-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-SimpleTCP-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-SimpleTCP-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-SimpleTCP-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :FileSharingSupport cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-FileSharingSupport if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-FileSharingSupport cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-SMB1-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-SMB1-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-SMB1-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-SMB1-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :TelnetClient cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-TelnetClient if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-TelnetClient cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-Telnet-Client-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-TFTP-Client-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Telnet-Client-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-TFTP-Client-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-Telnet-Client-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f reg delete "%Packages%\Microsoft-Windows-TFTP-Client-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Telnet-Client-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart dism /online /remove-package /packagename:Microsoft-Windows-TFTP-Client-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :IdentifyFoundation cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-IdentifyFoundation if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-IdentifyFoundation cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-Identity-Foundation-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Identity-Foundation-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-Identity-Foundation-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Identity-Foundation-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :Powershell2.0 cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-Powershell2.0 if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-Powershell2.0 cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-PowerShell-V2-Client-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-PowerShell-V2-Client-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-PowerShell-V2-Client-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-PowerShell-V2-Client-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :TIFFIFilter cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-TIFFIFilter if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-TIFFIFilter cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-WinOcr-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-WinOcr-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-WinOcr-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-WinOcr-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :XPSServices cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-XPSServices if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-XPSServices cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-Printing-XPSServices-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Printing-XPSServices-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-Printing-XPSServices-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Printing-XPSServices-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :XPSViewer cls choice /c YN /n /m "CẢNH BÁO: Tính năng này không thể cài đặt lại được nếu bị gỡ bỏ. Bạn có chắc không? (Yes/No) " if %errorlevel% EQU 1 goto Remove-XPSViewer if %errorlevel% EQU 2 goto Remove-Package : -------------------------------------------------- :Remove-XPSViewer cls IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg delete "%Packages%\Microsoft-Windows-Xps-Foundation-Client-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Xps-Foundation-Client-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( reg delete "%Packages%\Microsoft-Windows-Xps-Foundation-Client-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-Xps-Foundation-Client-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) cls echo.Hoạt động được hoàn tất thành công. pause goto Remove-Package :: ------------------------------------------------------------------------------------ :: ------------------------------------------------------------------------------------ :Restart cls echo.Windows sẽ được khởi động sau 15 giây. echo.Cảm ơn bạn đã sử dụng chương trình. echo.Mọi thắc mắc vui lòng liên lạc với tôi qua Facebook theo địa chỉ: fb.com/kequaduongvodanh echo.Tạm biệt và hẹn gặp lại! timeout /t 15 /nobreak shutdown /r /f /t 00 :: ------------------------------------------------------------------------------------
Lưu lại với tên ví dụ Remove-Package.cmd hoặc Remove-Package.bat định dạng All files và Encoding: UTF-8
Bước 3: Chạy tập tin batch vừa lưu chọn ID muốn gỡ bỏ nhấn Enter