|
@ -13516,6 +13516,72 @@ function EditWithPhotosContext |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
<# |
|
|
|
|
|
.SYNOPSIS |
|
|
|
|
|
The "Edit with Paint" item in the media files context menu |
|
|
|
|
|
|
|
|
|
|
|
.PARAMETER Hide |
|
|
|
|
|
Hide the "Edit with Paint" item from the media files context menu |
|
|
|
|
|
|
|
|
|
|
|
.PARAMETER Show |
|
|
|
|
|
Show the "Edit with Paint" item in the media files context menu |
|
|
|
|
|
|
|
|
|
|
|
.EXAMPLE |
|
|
|
|
|
EditWithPaintContext -Hide |
|
|
|
|
|
|
|
|
|
|
|
.EXAMPLE |
|
|
|
|
|
EditWithPaintContext -Show |
|
|
|
|
|
|
|
|
|
|
|
.NOTES |
|
|
|
|
|
Current user |
|
|
|
|
|
#> |
|
|
|
|
|
function EditWithPaintContext |
|
|
|
|
|
{ |
|
|
|
|
|
param |
|
|
|
|
|
( |
|
|
|
|
|
[Parameter( |
|
|
|
|
|
Mandatory = $true, |
|
|
|
|
|
ParameterSetName = "Hide" |
|
|
|
|
|
)] |
|
|
|
|
|
[switch] |
|
|
|
|
|
$Hide, |
|
|
|
|
|
|
|
|
|
|
|
[Parameter( |
|
|
|
|
|
Mandatory = $true, |
|
|
|
|
|
ParameterSetName = "Show" |
|
|
|
|
|
)] |
|
|
|
|
|
[switch] |
|
|
|
|
|
$Show |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
if (-not (Get-AppxPackage -Name Microsoft.Paint)) |
|
|
|
|
|
{ |
|
|
|
|
|
Write-Information -MessageData "" -InformationAction Continue |
|
|
|
|
|
Write-Verbose -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -Verbose |
|
|
|
|
|
Write-Error -Message ($Localization.Skipped -f $MyInvocation.Line.Trim()) -ErrorAction SilentlyContinue |
|
|
|
|
|
|
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{2430F218-B743-4FD6-97BF-5C76541B4AE9}" -Force -ErrorAction Ignore |
|
|
|
|
|
|
|
|
|
|
|
switch ($PSCmdlet.ParameterSetName) |
|
|
|
|
|
{ |
|
|
|
|
|
"Hide" |
|
|
|
|
|
{ |
|
|
|
|
|
if (-not (Test-Path -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked")) |
|
|
|
|
|
{ |
|
|
|
|
|
New-Item -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Force |
|
|
|
|
|
} |
|
|
|
|
|
New-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{2430F218-B743-4FD6-97BF-5C76541B4AE9}" -PropertyType String -Value "" -Force |
|
|
|
|
|
} |
|
|
|
|
|
"Show" |
|
|
|
|
|
{ |
|
|
|
|
|
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked" -Name "{2430F218-B743-4FD6-97BF-5C76541B4AE9}" -Force -ErrorAction Ignore |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
<# |
|
|
<# |
|
|
.SYNOPSIS |
|
|
.SYNOPSIS |
|
|
The "Print" item in the .bat and .cmd context menu |
|
|
The "Print" item in the .bat and .cmd context menu |
|
|