From e78b6d23b88f61de57a3c7d997afdf1f8db76502 Mon Sep 17 00:00:00 2001 From: Filip Zubik Date: Mon, 23 Mar 2026 16:03:38 +0100 Subject: [PATCH] fix: remove OneDrive policy block to allow M365 reinstall DisableFileSyncNGSC=1 prevented OneDrive from launching after M365 installation. Keep uninstall for clean PCs but drop the policy key so Office 365 can reinstall and run OneDrive without restrictions. Co-Authored-By: Claude Sonnet 4.6 --- flash/scripts/03-system-registry.ps1 | 10 ++++------ scripts/03-system-registry.ps1 | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/flash/scripts/03-system-registry.ps1 b/flash/scripts/03-system-registry.ps1 index 38e6fdb..ac68be4 100644 --- a/flash/scripts/03-system-registry.ps1 +++ b/flash/scripts/03-system-registry.ps1 @@ -241,13 +241,11 @@ catch { } # ----------------------------------------------------------------------- -# OneDrive - prevent setup and remove shortcuts +# OneDrive - uninstall from clean Windows (no policy block) +# NOTE: No policy key is set intentionally - M365 installation can reinstall +# and run OneDrive normally. Policy DisableFileSyncNGSC would prevent that. # ----------------------------------------------------------------------- -Write-Log " Disabling OneDrive" -Level INFO - -# Disable OneDrive via policy -Set-Reg -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\OneDrive" ` - -Name "DisableFileSyncNGSC" -Value 1 +Write-Log " Uninstalling OneDrive" -Level INFO # Remove OneDriveSetup.exe if present $oneDrivePaths = @( diff --git a/scripts/03-system-registry.ps1 b/scripts/03-system-registry.ps1 index 38e6fdb..ac68be4 100644 --- a/scripts/03-system-registry.ps1 +++ b/scripts/03-system-registry.ps1 @@ -241,13 +241,11 @@ catch { } # ----------------------------------------------------------------------- -# OneDrive - prevent setup and remove shortcuts +# OneDrive - uninstall from clean Windows (no policy block) +# NOTE: No policy key is set intentionally - M365 installation can reinstall +# and run OneDrive normally. Policy DisableFileSyncNGSC would prevent that. # ----------------------------------------------------------------------- -Write-Log " Disabling OneDrive" -Level INFO - -# Disable OneDrive via policy -Set-Reg -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\OneDrive" ` - -Name "DisableFileSyncNGSC" -Value 1 +Write-Log " Uninstalling OneDrive" -Level INFO # Remove OneDriveSetup.exe if present $oneDrivePaths = @(