Share batch code SetupComlete.cmd sử dụng cài đặt Windows 10 Pro, Version 1703
Tập tin batch SetupComlete.cmd bao gồm 2 phần Remove-ProvisionedAppxPackage gỡ bỏ ứng dụng mặc định thuộc nhóm WindowsApps và Remove-Package gỡ bỏ gói package hệ thống. Tập tin này sẽ được áp dụng ngay trong quá trình cài đặt và trước khi tạo và đăng nhập tài khoản đầu tiên.
Download SetupComlete.cmd
Tải về giải nén copy thư mục $OEM$ vào thư mục sources của bộ cài Windows 10 Pro, Version 1703.
Code:
:: Name : SetupComplete.cmd :: Author : Nguyen Tuan. :: Website : :: Settings :: ================================================================================== :Settings cd /d %~dp0 IF %PROCESSOR_ARCHITECTURE% == AMD64 ( copy data\amd64\SetACL.exe C:\Windows\System32\SetACL.exe ) ELSE ( copy data\x86\SetACL.exe C:\Windows\System32\SetACL.exe ) 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" reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "PromptOnSecureDesktop" /t REG_DWORD /d 0 /f reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" /v "Tweaks" /t REG_SZ /d "C:\Scripts\Enable-Tweaks.cmd" /f :: ================================================================================== :: Remove-ProvisionedAppxPackage :: ================================================================================== ::Remove-ProvisionedAppxPackage set Microsoft3DBuilder=Microsoft.3DBuilder_13.0.10349.0_neutral_~_8wekyb3d8bbwe set Weather=Microsoft.BingWeather_4.18.56.0_neutral_~_8wekyb3d8bbwe set AppInstaller=Microsoft.DesktopAppInstaller_1.1.25002.0_neutral_~_8wekyb3d8bbwe set Tips=Microsoft.Getstarted_4.5.6.0_neutral_~_8wekyb3d8bbwe set Messaging=Microsoft.Messaging_3.2.24002.0_neutral_~_8wekyb3d8bbwe set View3DReview=Microsoft.Microsoft3DViewer_1.1702.21039.0_neutral_~_8wekyb3d8bbwe set GetOffice=Microsoft.MicrosoftOfficeHub_2017.311.255.0_neutral_~_8wekyb3d8bbwe set MicrosoftSolitaireCollection=Microsoft.MicrosoftSolitaireCollection_3.14.1181.0_neutral_~_8wekyb3d8bbwe set StickyNotes=Microsoft.MicrosoftStickyNotes_1.4.101.0_neutral_~_8wekyb3d8bbwe set Paint3D=Microsoft.MSPaint_1.1702.28017.0_neutral_~_8wekyb3d8bbwe set OneNote=Microsoft.Office.OneNote_2015.7668.58071.0_neutral_~_8wekyb3d8bbwe set OneConnect=Microsoft.OneConnect_2.1701.277.0_neutral_~_8wekyb3d8bbwe set People=Microsoft.People_2017.222.1920.0_neutral_~_8wekyb3d8bbwe set SkypePreview=Microsoft.SkypeApp_11.8.204.0_neutral_~_kzf8qxf38zg5c set StorePurchaseApp=Microsoft.StorePurchaseApp_1.0.454.0_neutral_~_8wekyb3d8bbwe set MicrosoftWallet=Microsoft.Wallet_1.0.16328.0_neutral_~_8wekyb3d8bbwe set Photos=Microsoft.Windows.Photos_2016.511.9510.0_neutral_~_8wekyb3d8bbwe set AlarmsClock=Microsoft.WindowsAlarms_2017.203.236.0_neutral_~_8wekyb3d8bbwe set Calculator=Microsoft.WindowsCalculator_2017.131.1904.0_neutral_~_8wekyb3d8bbwe set Camera=Microsoft.WindowsCamera_2017.125.40.0_neutral_~_8wekyb3d8bbwe set MailCalendar=microsoft.windowscommunicationsapps_2015.7906.42257.0_neutral_~_8wekyb3d8bbwe set FeedbackHub=Microsoft.WindowsFeedbackHub_1.1612.10312.0_neutral_~_8wekyb3d8bbwe set Maps=Microsoft.WindowsMaps_2017.209.105.0_neutral_~_8wekyb3d8bbwe set VoiceRecorder=Microsoft.WindowsSoundRecorder_2017.130.1208.0_neutral_~_8wekyb3d8bbwe set Store=Microsoft.WindowsStore_11701.1001.874.0_neutral_~_8wekyb3d8bbwe set XboxApp=Microsoft.XboxApp_2017.113.1250.0_neutral_~_8wekyb3d8bbwe set XboxGameOverlay=Microsoft.XboxGameOverlay_1.15.2003.0_neutral_~_8wekyb3d8bbwe set XboxIdentityProvider=Microsoft.XboxIdentityProvider_2016.719.1035.0_neutral_~_8wekyb3d8bbwe set XboxSpeechToTextOverlay=Microsoft.XboxSpeechToTextOverlay_1.14.2002.0_neutral_~_8wekyb3d8bbwe set GrooveMusic=Microsoft.ZuneMusic_2019.16112.11621.0_neutral_~_8wekyb3d8bbwe set MoviesTV=Microsoft.ZuneVideo_2019.16112.11601.0_neutral_~_8wekyb3d8bbwe Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%Microsoft3DBuilder% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%Weather% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%AppInstaller% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%Tips% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%Messaging% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%View3DReview% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%GetOffice% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%MicrosoftSolitaireCollection% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%StickyNotes% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%Paint3D% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%OneNote% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%OneConnect% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%People% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%SkypePreview% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%StorePurchaseApp% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%MicrosoftWallet% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%Photos% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%AlarmsClock% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%Calculator% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%Camera% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%MailCalendar% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%FeedbackHub% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%Maps% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%VoiceRecorder% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%Store% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%XboxApp% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%XboxGameOverlay% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%XboxIdentityProvider% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%XboxSpeechToTextOverlay% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%GrooveMusic% Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%MoviesTV% :: ================================================================================== :: Remove-Package :: ================================================================================== :Remove-Connect 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 ) :: ------------------------------------------------------------------------------------ :Remove-ContactSupport 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 ) :: ------------------------------------------------------------------------------------ :Remove-MicrosoftEdge 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 ) :: ------------------------------------------------------------------------------------ :Remove-MixedRealityPortal 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 rd /s /q %systemroot%\systemapps\Microsoft.Windows.HolographicFirstRun_cw5n1h2txyewy :: ------------------------------------------------------------------------------------ :Remove-OneDrive IF %PROCESSOR_ARCHITECTURE% == AMD64 ( del /q /f %systemroot%\SysWOW64\OneDriveSetup.exe reg delete "%Packages%\Microsoft-Windows-OneDrive-Setup-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-OneDrive-Setup-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( del /q /f %systemroot%\System32\OneDriveSetup.exe reg delete "%Packages%\Microsoft-Windows-OneDrive-Setup-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-OneDrive-Setup-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) :: ------------------------------------------------------------------------------------ :Remove-QuickAssist 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 ) :: ------------------------------------------------------------------------------------ :Remove-WindowsDefender IF %PROCESSOR_ARCHITECTURE% == AMD64 ( reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v SettingsPageVisibility /t REG_SZ /d "hide:windowsdefender" /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 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" ) :: ------------------------------------------------------------------------------------ :Remove-WindowsSpotlight 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 ) :: ------------------------------------------------------------------------------------ :Remove-PhotoViewer 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 ) :: ------------------------------------------------------------------------------------ :Remove-SnippingTool 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 ) :: ------------------------------------------------------------------------------------ :Remove-ActiveDirectory 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 ) :: ------------------------------------------------------------------------------------ :Remove-Containers 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 ) :: ------------------------------------------------------------------------------------ :Remove-AssignedAccess 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 ) :: ------------------------------------------------------------------------------------ :Remove-DeviceLockdown 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 ) :: ------------------------------------------------------------------------------------ :Remove-Hyper-V 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 ) :: ------------------------------------------------------------------------------------ :Remove-InternetExplorer11 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 ) :: ------------------------------------------------------------------------------------ :Remove-LegacyComponents 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 ) :: ------------------------------------------------------------------------------------ :Remove-MediaFeatures 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 ) :: ------------------------------------------------------------------------------------ :Remove-MessageQueue 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 ) :: ------------------------------------------------------------------------------------ :Remove-PrinttoPDF 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 ) :: ------------------------------------------------------------------------------------ :Remove-MultiPointConnector 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 ) :: ------------------------------------------------------------------------------------ :Remove-PrintandDocument 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 ) :: ------------------------------------------------------------------------------------ :Remove-RASConnectionManager 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 ) :: ------------------------------------------------------------------------------------ :Remove-DifferentialCompressionAPI 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 ) :: ------------------------------------------------------------------------------------ :Remove-RIPListener 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 ) :: ------------------------------------------------------------------------------------ :Remove-ServicesforNFS 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 ) :: ------------------------------------------------------------------------------------ :Remove-SimpleNetwork 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 ) :: ------------------------------------------------------------------------------------ :Remove-SimpleTCPIP 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 ) :: ------------------------------------------------------------------------------------ :Remove-FileSharingSupport 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 ) : ------------------------------------------------------------------------------------ :Remove-TelnetClient 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 ) :: ------------------------------------------------------------------------------------ :Remove-IdentifyFoundation 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 ) :: ------------------------------------------------------------------------------------ :Remove-Powershell2.0 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 ) :: ------------------------------------------------------------------------------------ :Remove-TIFFIFilter 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 ) :: ------------------------------------------------------------------------------------ :Remove-XPSServices 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 ) :: ------------------------------------------------------------------------------------ :Remove-XPSViewer 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 ) :: ------------------------------------------------------------------------------------ :: ================================================================================== :: End
Hướng dẫn sửa code
Nếu muốn giữ lại ứng dụng nào chỉ cần xóa đoạn gỡ bỏ của ứng dụng đó đi ví dụ nếu muốn giữ lại Store thì xóa đoạn Dism /Online /Remove-ProvisionedAppxPackage /PackageName:%Store%. Tương tự nếu muốn giữ lại gói package nào thì xóa đoạn gỡ bỏ gói package đi ví dụ nếu muốn giữ lại OneDrive thì xóa đoạn dưới đây
:Remove-OneDrive IF %PROCESSOR_ARCHITECTURE% == AMD64 ( del /q /f %systemroot%\SysWOW64\OneDriveSetup.exe reg delete "%Packages%\Microsoft-Windows-OneDrive-Setup-Package~31bf3856ad364e35~amd64~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-OneDrive-Setup-Package~31bf3856ad364e35~amd64~~10.0.15063.0 /norestart ) ELSE ( del /q /f %systemroot%\System32\OneDriveSetup.exe reg delete "%Packages%\Microsoft-Windows-OneDrive-Setup-Package~31bf3856ad364e35~x86~~10.0.15063.0\Owners" /f dism /online /remove-package /packagename:Microsoft-Windows-OneDrive-Setup-Package~31bf3856ad364e35~x86~~10.0.15063.0 /norestart ) :: ------------------------------------------------------------------------------------