|
@ -9,8 +9,8 @@ echo "Remove OneDrive" |
|
|
if (Test-Path "$env:systemroot\System32\OneDriveSetup.exe") { |
|
|
if (Test-Path "$env:systemroot\System32\OneDriveSetup.exe") { |
|
|
& "$env:systemroot\System32\OneDriveSetup.exe" /uninstall |
|
|
& "$env:systemroot\System32\OneDriveSetup.exe" /uninstall |
|
|
} |
|
|
} |
|
|
if (Test-Path "$env:systemroot\SysWOW64\OneDriveSetup.exe") { |
|
|
if (Test-Path "$env:systemroot\SysWOW64\OneDriveSetup.exe") { |
|
|
& "$env:systemroot\SysWOW64\OneDriveSetup.exe" /uninstall |
|
|
& "$env:systemroot\SysWOW64\OneDriveSetup.exe" /uninstall |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
echo "Removing OneDrive leftovers" |
|
|
echo "Removing OneDrive leftovers" |
|
@ -25,7 +25,9 @@ sp "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows\OneDrive" "DisableFile |
|
|
|
|
|
|
|
|
echo "Remove Onedrive from explorer sidebar" |
|
|
echo "Remove Onedrive from explorer sidebar" |
|
|
New-PSDrive -PSProvider "Registry" -Root "HKEY_CLASSES_ROOT" -Name "HKCR" |
|
|
New-PSDrive -PSProvider "Registry" -Root "HKEY_CLASSES_ROOT" -Name "HKCR" |
|
|
|
|
|
mkdir -Force "HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" |
|
|
sp "HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" "System.IsPinnedToNameSpaceTree" 0 |
|
|
sp "HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" "System.IsPinnedToNameSpaceTree" 0 |
|
|
|
|
|
mkdir -Force "HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" |
|
|
sp "HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" "System.IsPinnedToNameSpaceTree" 0 |
|
|
sp "HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" "System.IsPinnedToNameSpaceTree" 0 |
|
|
Remove-PSDrive "HKCR" |
|
|
Remove-PSDrive "HKCR" |
|
|
|
|
|
|
|
|