Skip to content

Instantly share code, notes, and snippets.

@kkamegawa
Last active August 29, 2015 14:05
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 kkamegawa/2da502aab323db0de5dd to your computer and use it in GitHub Desktop.
Save kkamegawa/2da502aab323db0de5dd to your computer and use it in GitHub Desktop.
$fontregistory = 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts\'
$fonts = get-item -Path $fontregistory | Select-Object -expandProperty Property
foreach($font in $fonts){
$fontpath = get-ItemProperty -path $fontregistory | select-Object -property $font
#if font path is full path and exist
$FontExist = Test-Path $fontpath.$font
if($FontExist -eq $true){
if($fontpath.$font.EndsWith('.otf', $true, $null) -eq $true){
Write-Host "Your environmet will trouble with MS14-045. See https://support.microsoft.com/kb/2982791"
return
}
}
}
Write-Host "Your environment is OK."
@guitarrapc
Copy link

I may write with pipeline like this https://gist.github.com/guitarrapc/e7285c3c66e723e6d8cb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment