Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lossless-cut polluting registry #76

Open
SenseOnline opened this issue Sep 27, 2022 · 1 comment
Open

lossless-cut polluting registry #76

SenseOnline opened this issue Sep 27, 2022 · 1 comment

Comments

@SenseOnline
Copy link

Lossless-cut registry keys created on install are not removed on uninstall.

Any way to remove them?

@SenseOnline
Copy link
Author

Digging further, it looks like the install script was updated in 68d4fa9 without the corresponding updates to the uninstall script.

A quick fix would be to replace the following lines in the uninstall script

# Remove File Association for .MP4
Remove-Item -Recurse -Force -LiteralPath "HKLM:\SOFTWARE\Classes\SystemFileAssociations\.mp4\Shell\cut" -ErrorAction SilentlyContinue
Remove-Item -Recurse -Force -LiteralPath "HKLM:\SOFTWARE\Classes\Applications\LosslessCut.exe" -ErrorAction SilentlyContinue

to something like this, adding any neccessary checks or corrections
since I highly doubt I'd get it right the first time without testing

# Remove File Associations
Remove-Item -LiteralPath "HKLM:\SOFTWARE\Clients\Media\LosslessCut" -Recurse -Force -ErrorAction SilentlyContinue;
Remove-Item -LiteralPath "HKLM:\SOFTWARE\Classes\Applications\LosslessCut.exe" -Recurse -Force -ErrorAction SilentlyContinue;
Remove-ItemProperty -LiteralPath "HKLM:\SOFTWARE\RegisteredApplications" -Name "LosslessCut" -Force -ErrorAction SilentlyContinue;

$extensions = @("3g2","3gp","8svx","aa","aac","aax","act","aiff","alac","amr","amv","ape","asf","au","avi","awb","cda","dct","drc","dss","dvf","f4a","f4b","f4p","f4v","flac","flv","gif","gifv","gsm","iklax","ivs","m2ts","m2v","m4a","m4b","m4p","m4v","mkv","mmf","mng","mogg","mov","mp2","mp3","mp4","mpc","mpe","mpeg","mpg","mpv","msv","mts","mxf","nmf","nsf","nsv","oga","ogg","ogv","opus","qt","ra","rf64","rm","rmvb","roq","sln","svi","ts","tta","vob","voc","vox","wav","webm","wma","wmv","wv","yuv","tsv","3gpp","webm")
foreach ($extension in $extensions) {
	Remove-Item -LiteralPath "HKLM:\SOFTWARE\Classes\.$extension\OpenWithList\LosslessCut.exe" -Recurse -Force -ErrorAction SilentlyContinue;
	Remove-Item -LiteralPath ("HKLM:\SOFTWARE\Classes\LossLessCut." + "$extension".ToUpper()) -Recurse -Force -ErrorAction SilentlyContinue;
	Remove-Item -LiteralPath "HKLM:\SOFTWARE\Classes\SystemFileAssociations\.$extension\Shell\losslesscut" -Recurse -Force -ErrorAction SilentlyContinue;
	Remove-ItemProperty -LiteralPath "HKLM:\SOFTWARE\Classes\.$extension\OpenWithProgids" -Name ("LosslessCut." + "$extension".ToUpper()) -Force -ErrorAction SilentlyContinue;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant