I would like to install Lato font as a custom powershell inline script that runs at the Wizard Dialog Stage
The script runs fine, however the fonts do not get installed, I don't think it can find the font files correctly - what is best procedure to install something placed in APPDIR location
Code: Select all
param($AppPath)
$AppPath = $AppPath.TrimEnd('\')
write-output "Path = $AppPath"
cd 'Resources\Fonts'
Copy-Item "Lato-Bold.ttf" -Destination "C:\Windows\Fonts"
Copy-Item "Lato-Light.ttf" -Destination "C:\Windows\Fonts"
Copy-Item "Lato-Regular.ttf" -Destination "C:\Windows\Fonts"
Copy-Item "Lato-Thin.ttf" -Destination "C:\Windows\Fonts"
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "Lato Bold (OpenType)" /t REG_SZ /d Lato-Bold.ttf /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "Lato-Light (OpenType)" /t REG_SZ /d Lato-Light.ttf /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "Lato Regular (OpenType)" /t REG_SZ /d Lato-Regular.ttf /f
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts" /v "Lato-Hairline (OpenType)" /t REG_SZ /d Lato-Thin.ttf /f

FOLLOW US