mirror of
https://github.com/Sycnex/Windows10Debloater.git
synced 2025-03-12 18:05:29 +00:00
Added New-PSDrive HKCR in uninstall OneDrive Function
I added code to create a new PSDrive for HKCR so that the function can access the portion of the registry associated with HKCR and create/modify the specific registry keys. I believe this resolves the function from hanging.
This commit is contained in:
parent
57ef7e83b6
commit
d2c812df11
@ -512,11 +512,14 @@ Function EnableWAPPush {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Function UninstallOneDrive {
|
Function UninstallOneDrive {
|
||||||
Write-Output "Uninstalling OneDrive"
|
|
||||||
|
Write-Output "Uninstalling OneDrive"
|
||||||
|
|
||||||
|
New-PSDrive HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
|
||||||
$onedrive = "$env:SYSTEMROOT\SysWOW64\OneDriveSetup.exe"
|
$onedrive = "$env:SYSTEMROOT\SysWOW64\OneDriveSetup.exe"
|
||||||
$ExplorerReg1 = "HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}"
|
$ExplorerReg1 = "HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}"
|
||||||
$ExplorerReg2 = "HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}"
|
$ExplorerReg2 = "HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}"
|
||||||
Stop-Process OneDrive
|
Stop-Process -Name "OneDrive*"
|
||||||
Start-Sleep 2
|
Start-Sleep 2
|
||||||
If (!(Test-Path $onedrive)) {
|
If (!(Test-Path $onedrive)) {
|
||||||
$onedrive = "$env:SYSTEMROOT\System32\OneDriveSetup.exe"
|
$onedrive = "$env:SYSTEMROOT\System32\OneDriveSetup.exe"
|
||||||
|
Loading…
Reference in New Issue
Block a user