OneDrive reintegrates itself after many removal scripts. install-wim-tweak can target the component:
install-wim-tweak.exe /p "OneDriveSetup" /d
install-wim-tweak.exe /p "Microsoft.Windows.OneDrive" /d
Follow with deleting %SystemRoot%\SysWOW64\OneDriveSetup.exe and shell folder overrides. install-wim-tweak.exe
| Use Case | Description | |----------|-------------| | Creating a "Debloated" Windows ISO | Remove pre-installed apps like Candy Crush, Skype, Xbox, and News before installation. | | Enterprise Customization | Remove consumer features not needed in a business environment. | | Performance Tuning | Disable background services and telemetry components to reduce resource usage. | | Privacy Enhancement | Remove or disable Microsoft’s data-collecting components (e.g., DiagTrack, OneDrive, Cortana). | OneDrive reintegrates itself after many removal scripts
Disclaimer: Modifying Windows system images may violate your Microsoft Software License Terms, especially on Home editions. This guide is for educational and enterprise-licensed use only. Always test thoroughly before deployment. Follow with deleting %SystemRoot%\SysWOW64\OneDriveSetup
⚠️ Important Warning: Using this tool incorrectly can break Windows updates, cause system instability, or require a reinstall. Only use it if you understand Windows component servicing. Always test in a virtual machine first.
install-wim-tweak.exe is a command-line utility designed to manipulate the Windows Image (WIM) file and, more specifically, to enable or disable Windows Capabilities and System Apps that are normally protected by Windows' Component-Based Servicing (CBS).
| Switch | Description |
|--------|-------------|
| /l | List all packages |
| /p "name" | Specify package name (partial match allowed) |
| /d | Delete package registration |
| /c | Case-insensitive match |
| /o | Enable hidden legacy features |
| /server:path | Target an offline WIM mount point |
| /h | Display help |