Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Название темы: [решено] microsoft edge и pdf
Показать сообщение отдельно

Новый участник


Сообщения: 1
Благодарности: 0

Профиль | Отправить PM | Цитировать


Sumkin2010,

Здравствуйте! Воспользовался вашим antiedge - скрипт рабочий и действительно убивает ассоциации, причем рубит прямо под корень.
Но приходится работать часто с PDF и на столько "под корень" что я устал каждый раз при открытие файла PDF выбирать открыть с помощью. Хочу все вернуть, но в программной коде PowerShell не разбираюсь, как откатить через PowerShell этот antiedge - что нужно изменить в коде что бы он сработал и вернулось все обратно? Заранее спасибо
PS: действительно рад был по началу что победил, но теперь хочу вернуть, пусть открывает через Edge что бы быстро смотреть, а если надо то буду выбирать через что открыть.

Ниже сам код из файла antiEdge!

Скрытый текст
# This script will check the registry for all file associations that might be set to open by default by Edge browser
# For those who do not want Edge browser opening pdf files or anything else by default


# Identify the edge application class
$Packages = "HKCU:SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages"
$edge = Get-ChildItem $Packages -Recurse -include "MicrosoftEdge"

# Specify the paths to the file and URL associations
$FileAssocKey = Join-Path $edge.PSPath Capabilities\FileAssociations
$URLAssocKey = Join-Path $edge.PSPath Capabilities\URLAssociations

# get the software classes for the file and URL types that Edge will associate
$FileTypes = Get-Item $FileAssocKey
$URLTypes = Get-Item $URLAssocKey

$FileAssoc = Get-ItemProperty $FileAssocKey
$URLAssoc = Get-ItemProperty $URLAssocKey

$Associations = @()
$Filetypes.Property | foreach {$Associations += $FileAssoc.$_}
$URLTypes.Property | foreach {$Associations += $URLAssoc.$_}

# add registry values in each software class to stop edge from associating as the default
foreach ($Association in $Associations)
{
$Class = Join-Path HKCU:SOFTWARE\Classes $Association
#if (Test-Path $class)
# {write-host $Association}
# Get-Item $Class
Set-ItemProperty $Class -Name NoOpenWith -Value ""
Set-ItemProperty $Class -Name NoStaticDefaultVerb -Value ""
}

Последний раз редактировалось ArtchibalD, 27-01-2020 в 14:14.


Отправлено: 14:08, 27-01-2020 | #9

Название темы: [решено] microsoft edge и pdf