Files
SceneMarshal/scripts/uninstall-explorer-menu.ps1
T
ali e66d082f31 chore: 项目更名为 SceneMarshal
- README/脚本注释/LICENSE/图标文件名统一改名
- 右键菜单注册项改为 SceneMarshal / SceneMarshalArchive
- media_archive 支持 SCENEMARSHAL_* 环境变量(保留旧变量兼容)
- README 补充 preflight/字幕/字体/归档等实际能力与 check 用法
2026-11-19 12:21:42 +08:00

36 lines
997 B
PowerShell

#Requires -Version 7.0
<#
.SYNOPSIS
移除 install-explorer-menu.ps1 注册的右键菜单(重命名 + 归档)。
.EXAMPLE
.\uninstall-explorer-menu.ps1
#>
[CmdletBinding()]
param()
$ErrorActionPreference = 'Stop'
$keyNames = @('SceneMarshal', 'SceneMarshalArchive')
$shells = @(
'HKCU:\Software\Classes\Directory\shell',
'HKCU:\Software\Classes\Directory\Background\shell',
'HKCU:\Software\Classes\SystemFileAssociations\.mkv\shell',
'HKCU:\Software\Classes\SystemFileAssociations\.mp4\shell',
'HKCU:\Software\Classes\SystemFileAssociations\.avi\shell'
)
$removed = 0
foreach ($shell in $shells) {
foreach ($name in $keyNames) {
$key = Join-Path $shell $name
if (Test-Path -LiteralPath $key) {
Remove-Item -LiteralPath $key -Recurse -Force
$removed++
Write-Host " - 已移除 $key" -ForegroundColor DarkGray
}
}
}
Write-Host "✔ 右键菜单已清理($removed 项)" -ForegroundColor Green