Skip to content

Instantly share code, notes, and snippets.

@cmatskas
Last active March 16, 2022 23:40
Show Gist options
  • Select an option

  • Save cmatskas/341726cba7c1678d8ae83d15e582ecb7 to your computer and use it in GitHub Desktop.

Select an option

Save cmatskas/341726cba7c1678d8ae83d15e582ecb7 to your computer and use it in GitHub Desktop.

Revisions

  1. cmatskas revised this gist Mar 16, 2022. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions PowerShell
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    echo "Install fonts"
    echo "Install Custom fonts"
    $fonts = (New-Object -ComObject Shell.Application).Namespace(0x14)
    foreach ($file in gci *.ttf)
    {
    @@ -7,5 +7,4 @@ foreach ($file in gci *.ttf)
    echo $fileName
    dir $file | %{ $fonts.CopyHere($_.fullname) }
    }
    }
    cp *.ttf c:\windows\fonts\
    }
  2. cmatskas created this gist Mar 13, 2022.
    11 changes: 11 additions & 0 deletions PowerShell
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    echo "Install fonts"
    $fonts = (New-Object -ComObject Shell.Application).Namespace(0x14)
    foreach ($file in gci *.ttf)
    {
    $fileName = $file.Name
    if (-not(Test-Path -Path "C:\Windows\fonts\$fileName" )) {
    echo $fileName
    dir $file | %{ $fonts.CopyHere($_.fullname) }
    }
    }
    cp *.ttf c:\windows\fonts\