Skip to content

Instantly share code, notes, and snippets.

@danjpadgett
Created July 24, 2017 07:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danjpadgett/a10ddc0fdcd329cf82978d13a60abe17 to your computer and use it in GitHub Desktop.
Save danjpadgett/a10ddc0fdcd329cf82978d13a60abe17 to your computer and use it in GitHub Desktop.
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