|
|
@ -10159,12 +10159,8 @@ function HEIF |
|
|
|
$Manually |
|
|
|
) |
|
|
|
|
|
|
|
switch ($PSCmdlet.ParameterSetName) |
|
|
|
{ |
|
|
|
"Install" |
|
|
|
{ |
|
|
|
# Check whether the extension is already installed |
|
|
|
if (-not ((Get-AppxPackage -Name Microsoft.HEVCVideoExtension) -and (Get-AppxPackage -Name Microsoft.Windows.Photos))) |
|
|
|
if (-not (Get-AppxPackage -Name Microsoft.Windows.Photos)) |
|
|
|
{ |
|
|
|
return |
|
|
|
} |
|
|
@ -10182,7 +10178,20 @@ function HEIF |
|
|
|
{ |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
catch [System.Net.WebException] |
|
|
|
{ |
|
|
|
Write-Warning -Message $Localization.NoInternetConnection |
|
|
|
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue |
|
|
|
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue |
|
|
|
|
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
switch ($PSCmdlet.ParameterSetName) |
|
|
|
{ |
|
|
|
"Install" |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
# Check whether https://store.rg-adguard.net is alive |
|
|
@ -10208,6 +10217,7 @@ function HEIF |
|
|
|
Method = "Post" |
|
|
|
ContentType = "application/x-www-form-urlencoded" |
|
|
|
Body = $Body |
|
|
|
UseBasicParsing = $true |
|
|
|
Verbose = $true |
|
|
|
} |
|
|
|
$Raw = Invoke-WebRequest @Parameters |
|
|
@ -10227,6 +10237,7 @@ function HEIF |
|
|
|
$Parameters = @{ |
|
|
|
Uri = $TempURL |
|
|
|
OutFile = "$DownloadsFolder\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.appx" |
|
|
|
UseBasicParsing = $true |
|
|
|
Verbose = $true |
|
|
|
} |
|
|
|
Invoke-WebRequest @Parameters |
|
|
@ -10238,49 +10249,16 @@ function HEIF |
|
|
|
} |
|
|
|
catch [System.Net.WebException] |
|
|
|
{ |
|
|
|
Write-Warning -Message ($Localization.NoResponse -f "https://github.com") |
|
|
|
Write-Error -Message ($Localization.NoResponse -f "https://github.com") -ErrorAction SilentlyContinue |
|
|
|
|
|
|
|
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue |
|
|
|
} |
|
|
|
} |
|
|
|
catch [System.Net.WebException] |
|
|
|
{ |
|
|
|
Write-Warning -Message $Localization.NoInternetConnection |
|
|
|
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue |
|
|
|
Write-Warning -Message ($Localization.NoResponse -f "https://store.rg-adguard.net/api/GetFiles") |
|
|
|
Write-Error -Message ($Localization.NoResponse -f "https://store.rg-adguard.net/api/GetFiles") -ErrorAction SilentlyContinue |
|
|
|
|
|
|
|
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue |
|
|
|
} |
|
|
|
} |
|
|
|
"Manually" |
|
|
|
{ |
|
|
|
if ((-not (Get-AppxPackage -Name Microsoft.HEVCVideoExtension)) -and (Get-AppxPackage -Name Microsoft.Windows.Photos)) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
# Check the internet connection |
|
|
|
$Parameters = @{ |
|
|
|
Uri = "https://www.google.com" |
|
|
|
Method = "Head" |
|
|
|
DisableKeepAlive = $true |
|
|
|
UseBasicParsing = $true |
|
|
|
} |
|
|
|
if (-not (Invoke-WebRequest @Parameters).StatusDescription) |
|
|
|
{ |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
Start-Process -FilePath ms-windows-store://pdp/?ProductId=9n4wgh0z6vhq |
|
|
|
} |
|
|
|
catch [System.Net.WebException] |
|
|
|
{ |
|
|
|
Write-Warning -Message $Localization.NoInternetConnection |
|
|
|
Write-Error -Message $Localization.NoInternetConnection -ErrorAction SilentlyContinue |
|
|
|
|
|
|
|
Write-Error -Message ($Localization.RestartFunction -f $MyInvocation.Line) -ErrorAction SilentlyContinue |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -12994,7 +12972,7 @@ function Windows10ContextMenu |
|
|
|
#region Update Policies |
|
|
|
<# |
|
|
|
.SYNOPSIS |
|
|
|
Update Local Group Policy Editor (gpedit.msc) to make all manually created policy keys in the registry visible in the snap-in |
|
|
|
Display all policy registry keys (even manually created ones) in the Local Group Policy Editor snap-in (gpedit.msc) |
|
|
|
|
|
|
|
.EXAMPLE |
|
|
|
UpdateLGPEPolicies |
|
|
@ -13004,6 +12982,7 @@ function Windows10ContextMenu |
|
|
|
|
|
|
|
.NOTES |
|
|
|
Machine-wide user |
|
|
|
Current user |
|
|
|
#> |
|
|
|
function UpdateLGPEPolicies |
|
|
|
{ |
|
|
|