16 lines
636 B
PowerShell
16 lines
636 B
PowerShell
if (!(Test-Path -Path "$env:windir\Registry-Backup")) {
|
|
New-Item -Path "$env:windir\Registry-Backup" -ItemType Directory -Force | Out-Null
|
|
}
|
|
|
|
Start-Process -FilePath "regedit.exe " `
|
|
-ArgumentList "/E `"$env:windir\Registry-Backup\ms-msdt.reg`" `"HKEY_CLASSES_ROOT\ms-msdt`"" `
|
|
-WindowStyle Hidden `
|
|
-Wait
|
|
|
|
Start-Process -FilePath "regedit.exe " `
|
|
-ArgumentList "/E `"$env:windir\Registry-Backup\search-ms.reg`" `"HKEY_CLASSES_ROOT\search-ms`"" `
|
|
-WindowStyle Hidden `
|
|
-Wait
|
|
|
|
Remove-Item -Path "registry::HKEY_CLASSES_ROOT\ms-msdt" -Force -Recurse
|
|
Remove-Item -Path "registry::HKEY_CLASSES_ROOT\search-ms" -Force -Recurse |