Created
July 24, 2017 07:52
-
-
Save danjpadgett/a10ddc0fdcd329cf82978d13a60abe17 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
Try | |
{ | |
Set-ItemProperty -Path HKLM:\Software\Policies\Microsoft\Windows\System -Name DefaultAssociationsConfiguration -Value '\\Server\Share\AppAssoc.xml' | |
New-Item -Path HKLM:\Software\Classes\AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723 | |
Set-ItemProperty -Path HKLM:\Software\Classes\AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723 -Name NoOpenWith -Value '' | |
Set-ItemProperty -Path HKLM:\Software\Classes\AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723 -Name NoStaticDefaultVerb -Value '' | |
#DISM Method does not work in 1703. | |
#Dism.exe /online /Import-DefaultAppAssociations:\\Server\Share\AppAssoc.xml | |
} | |
Catch | |
{ | |
Write-Host "Error Output..." -ForegroundColor Yellow ; ` | |
$Error[0].Exception ; ` | |
$Error[0].InvocationInfo | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment