Created
October 31, 2021 19:38
-
-
Save zbalkan/9f624b73b074067dc1685565f1f908a5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reg2CI (c) 2021 by Roger Zander | |
if((Test-Path -LiteralPath "HKLM:\SOFTWARE\Classes\Applications\photoviewer.dll") -ne $true) { New-Item "HKLM:\SOFTWARE\Classes\Applications\photoviewer.dll" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKLM:\SOFTWARE\Classes\Applications\photoviewer.dll\shell") -ne $true) { New-Item "HKLM:\SOFTWARE\Classes\Applications\photoviewer.dll\shell" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKLM:\SOFTWARE\Classes\Applications\photoviewer.dll\shell\open") -ne $true) { New-Item "HKLM:\SOFTWARE\Classes\Applications\photoviewer.dll\shell\open" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKLM:\SOFTWARE\Classes\Applications\photoviewer.dll\shell\open\command") -ne $true) { New-Item "HKLM:\SOFTWARE\Classes\Applications\photoviewer.dll\shell\open\command" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKLM:\SOFTWARE\Classes\Applications\photoviewer.dll\shell\open\DropTarget") -ne $true) { New-Item "HKLM:\SOFTWARE\Classes\Applications\photoviewer.dll\shell\open\DropTarget" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKLM:\SOFTWARE\Classes\Applications\photoviewer.dll\shell\print") -ne $true) { New-Item "HKLM:\SOFTWARE\Classes\Applications\photoviewer.dll\shell\print" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKLM:\SOFTWARE\Classes\Applications\photoviewer.dll\shell\print\command") -ne $true) { New-Item "HKLM:\SOFTWARE\Classes\Applications\photoviewer.dll\shell\print\command" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKLM:\SOFTWARE\Classes\Applications\photoviewer.dll\shell\print\DropTarget") -ne $true) { New-Item "HKLM:\SOFTWARE\Classes\Applications\photoviewer.dll\shell\print\DropTarget" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Classes\.bmp") -ne $true) { New-Item "HKCU:\SOFTWARE\Classes\.bmp" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Classes\.cr2") -ne $true) { New-Item "HKCU:\SOFTWARE\Classes\.cr2" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Classes\.dib") -ne $true) { New-Item "HKCU:\SOFTWARE\Classes\.dib" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Classes\.gif") -ne $true) { New-Item "HKCU:\SOFTWARE\Classes\.gif" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Classes\.ico") -ne $true) { New-Item "HKCU:\SOFTWARE\Classes\.ico" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Classes\.jfif") -ne $true) { New-Item "HKCU:\SOFTWARE\Classes\.jfif" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Classes\.jpe") -ne $true) { New-Item "HKCU:\SOFTWARE\Classes\.jpe" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Classes\.jpeg") -ne $true) { New-Item "HKCU:\SOFTWARE\Classes\.jpeg" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Classes\.jpg") -ne $true) { New-Item "HKCU:\SOFTWARE\Classes\.jpg" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Classes\.jxr") -ne $true) { New-Item "HKCU:\SOFTWARE\Classes\.jxr" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Classes\.png") -ne $true) { New-Item "HKCU:\SOFTWARE\Classes\.png" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Classes\.tif") -ne $true) { New-Item "HKCU:\SOFTWARE\Classes\.tif" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Classes\.tiff") -ne $true) { New-Item "HKCU:\SOFTWARE\Classes\.tiff" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Classes\.wdp") -ne $true) { New-Item "HKCU:\SOFTWARE\Classes\.wdp" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bmp\OpenWithProgids") -ne $true) { New-Item "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bmp\OpenWithProgids" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.cr2\OpenWithProgids") -ne $true) { New-Item "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.cr2\OpenWithProgids" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.dib\OpenWithProgids") -ne $true) { New-Item "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.dib\OpenWithProgids" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.gif\OpenWithProgids") -ne $true) { New-Item "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.gif\OpenWithProgids" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.ico\OpenWithProgids") -ne $true) { New-Item "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.ico\OpenWithProgids" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpeg\OpenWithProgids") -ne $true) { New-Item "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpeg\OpenWithProgids" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jfif\OpenWithProgids") -ne $true) { New-Item "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jfif\OpenWithProgids" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpe\OpenWithProgids") -ne $true) { New-Item "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpe\OpenWithProgids" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jxr\OpenWithProgids") -ne $true) { New-Item "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jxr\OpenWithProgids" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\OpenWithProgids") -ne $true) { New-Item "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\OpenWithProgids" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\OpenWithProgids") -ne $true) { New-Item "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\OpenWithProgids" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.tif\OpenWithProgids") -ne $true) { New-Item "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.tif\OpenWithProgids" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.tiff\OpenWithProgids") -ne $true) { New-Item "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.tiff\OpenWithProgids" -Force -ErrorAction SilentlyContinue }; | |
if((Test-Path -LiteralPath "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.wdp\OpenWithProgids") -ne $true) { New-Item "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.wdp\OpenWithProgids" -Force -ErrorAction SilentlyContinue }; | |
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Classes\Applications\photoviewer.dll\shell\open' -Name 'MuiVerb' -Value '@photoviewer.dll,-3043' -PropertyType String -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Classes\Applications\photoviewer.dll\shell\open\command' -Name '(default)' -Value '%SystemRoot%\System32\rundll32.exe "%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll", ImageView_Fullscreen %1' -PropertyType ExpandString -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Classes\Applications\photoviewer.dll\shell\open\DropTarget' -Name 'Clsid' -Value '{FFE2A43C-56B9-4bf5-9A79-CC6D4285608A}' -PropertyType String -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Classes\Applications\photoviewer.dll\shell\print\command' -Name '(default)' -Value '%SystemRoot%\System32\rundll32.exe "%ProgramFiles%\Windows Photo Viewer\PhotoViewer.dll", ImageView_Fullscreen %1' -PropertyType ExpandString -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKLM:\SOFTWARE\Classes\Applications\photoviewer.dll\shell\print\DropTarget' -Name 'Clsid' -Value '{60fd46de-f830-4894-a628-6fa81bc0190d}' -PropertyType String -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Classes\.bmp' -Name '(default)' -Value 'PhotoViewer.FileAssoc.Tiff' -PropertyType String -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Classes\.cr2' -Name '(default)' -Value 'PhotoViewer.FileAssoc.Tiff' -PropertyType String -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Classes\.dib' -Name '(default)' -Value 'PhotoViewer.FileAssoc.Tiff' -PropertyType String -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Classes\.gif' -Name '(default)' -Value 'PhotoViewer.FileAssoc.Tiff' -PropertyType String -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Classes\.ico' -Name '(default)' -Value 'PhotoViewer.FileAssoc.Tiff' -PropertyType String -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Classes\.jfif' -Name '(default)' -Value 'PhotoViewer.FileAssoc.Tiff' -PropertyType String -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Classes\.jpe' -Name '(default)' -Value 'PhotoViewer.FileAssoc.Tiff' -PropertyType String -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Classes\.jpeg' -Name '(default)' -Value 'PhotoViewer.FileAssoc.Tiff' -PropertyType String -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Classes\.jpg' -Name '(default)' -Value 'PhotoViewer.FileAssoc.Tiff' -PropertyType String -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Classes\.jxr' -Name '(default)' -Value 'PhotoViewer.FileAssoc.Tiff' -PropertyType String -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Classes\.png' -Name '(default)' -Value 'PhotoViewer.FileAssoc.Tiff' -PropertyType String -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Classes\.tif' -Name '(default)' -Value 'PhotoViewer.FileAssoc.Tiff' -PropertyType String -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Classes\.tiff' -Name '(default)' -Value 'PhotoViewer.FileAssoc.Tiff' -PropertyType String -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Classes\.wdp' -Name '(default)' -Value 'PhotoViewer.FileAssoc.Tiff' -PropertyType String -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bmp\OpenWithProgids' -Name 'PhotoViewer.FileAssoc.Tiff' -Value (New-Object Byte[] 0) -PropertyType None -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.cr2\OpenWithProgids' -Name 'PhotoViewer.FileAssoc.Tiff' -Value (New-Object Byte[] 0) -PropertyType None -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.dib\OpenWithProgids' -Name 'PhotoViewer.FileAssoc.Tiff' -Value (New-Object Byte[] 0) -PropertyType None -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.gif\OpenWithProgids' -Name 'PhotoViewer.FileAssoc.Tiff' -Value (New-Object Byte[] 0) -PropertyType None -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.ico\OpenWithProgids' -Name 'PhotoViewer.FileAssoc.Tiff' -Value (New-Object Byte[] 0) -PropertyType None -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpeg\OpenWithProgids' -Name 'PhotoViewer.FileAssoc.Tiff' -Value (New-Object Byte[] 0) -PropertyType None -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.bmp\OpenWithProgids' -Name 'PhotoViewer.FileAssoc.Tiff' -Value (New-Object Byte[] 0) -PropertyType None -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jfif\OpenWithProgids' -Name 'PhotoViewer.FileAssoc.Tiff' -Value (New-Object Byte[] 0) -PropertyType None -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpe\OpenWithProgids' -Name 'PhotoViewer.FileAssoc.Tiff' -Value (New-Object Byte[] 0) -PropertyType None -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jxr\OpenWithProgids' -Name 'PhotoViewer.FileAssoc.Tiff' -Value (New-Object Byte[] 0) -PropertyType None -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpeg\OpenWithProgids' -Name 'PhotoViewer.FileAssoc.Tiff' -Value (New-Object Byte[] 0) -PropertyType None -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jpg\OpenWithProgids' -Name 'PhotoViewer.FileAssoc.Tiff' -Value (New-Object Byte[] 0) -PropertyType None -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.png\OpenWithProgids' -Name 'PhotoViewer.FileAssoc.Tiff' -Value (New-Object Byte[] 0) -PropertyType None -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.tif\OpenWithProgids' -Name 'PhotoViewer.FileAssoc.Tiff' -Value (New-Object Byte[] 0) -PropertyType None -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.tiff\OpenWithProgids' -Name 'PhotoViewer.FileAssoc.Tiff' -Value (New-Object Byte[] 0) -PropertyType None -Force -ErrorAction SilentlyContinue; | |
New-ItemProperty -LiteralPath 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.wdp\OpenWithProgids' -Name 'PhotoViewer.FileAssoc.Tiff' -Value (New-Object Byte[] 0) -PropertyType None -Force -ErrorAction SilentlyContinue; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment