Category filter
Script to change Fonts on Windows 10 devices
Modifying the system fonts on Windows 10 is a lot easier with scripts. For those font files installed on the devices already, the administrator can execute scripts from the Hexnode console to change the system font to the specified font family or typeface.
Change System Font
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
$string1 = "Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts] `"Segoe UI (TrueType)`"=`"`" `"Segoe UI Bold (TrueType)`"=`"`" `"Segoe UI Bold Italic (TrueType)`"=`"`" `"Segoe UI Italic (TrueType)`"=`"`" `"Segoe UI Light (TrueType)`"=`"`" `"Segoe UI Semibold (TrueType)`"=`"`" `"Segoe UI Symbol (TrueType)`"=`"`" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes] `"Segoe UI`"=`"$args`" " Add-Content C:\hexnode\new_font.reg $string1 Write-Output $? Start-Process regedit.exe -ArgumentList '/s','C:\hexnode\new_font.reg' -PassThru Remove-Item -Path C:\hexnode\new_font.reg |
While executing the script from the Hexnode console, you must specify the name of the required font within double quotes in the Arguments field. If the font files are installed already, the changes affect the device following a restart action.
Revert to the default System Font
You may use the following script to revert the system to its default font.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
$string1 = "Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts] `"Segoe UI (TrueType)`"=`"segoeui.ttf`" `"Segoe UI Black (TrueType)`"=`"seguibl.ttf`" `"Segoe UI Black Italic (TrueType)`"=`"seguibli.ttf`" `"Segoe UI Bold (TrueType)`"=`"segoeuib.ttf`" `"Segoe UI Bold Italic (TrueType)`"=`"segoeuiz.ttf`" `"Segoe UI Emoji (TrueType)`"=`"seguiemj.ttf`" `"Segoe UI Historic (TrueType)`"=`"seguihis.ttf`" `"Segoe UI Italic (TrueType)`"=`"segoeuii.ttf`" `"Segoe UI Light (TrueType)`"=`"segoeuil.ttf`" `"Segoe UI Light Italic (TrueType)`"=`"seguili.ttf`" `"Segoe UI Semibold (TrueType)`"=`"seguisb.ttf`" `"Segoe UI Semibold Italic (TrueType)`"=`"seguisbi.ttf`" `"Segoe UI Semilight (TrueType)`"=`"segoeuisl.ttf`" `"Segoe UI Semilight Italic (TrueType)`"=`"seguisli.ttf`" `"Segoe UI Symbol (TrueType)`"=`"seguisym.ttf`" `"Segoe MDL2 Assets (TrueType)`"=`"segmdl2.ttf`" `"Segoe Print (TrueType)`"=`"segoepr.ttf`" `"Segoe Print Bold (TrueType)`"=`"segoeprb.ttf`" `"Segoe Script (TrueType)`"=`"segoesc.ttf`" `"Segoe Script Bold (TrueType)`"=`"segoescb.ttf`" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes] `"Segoe UI`"=- " Add-Content C:\hexnode\new_font.reg $string1 Write-Output $? Start-Process regedit.exe -ArgumentList '/s','C:\hexnode\new_font.reg' -PassThru Remove-Item -Path C:\hexnode\new_font.reg |
Once the script is executed, a device restart is necessary for the changes to take effect.