Windows 10 Can no longer install fonts via script in Windows 10 1809

  • Thread starter Thread starter Udo Schwartz
  • Start date Start date
U

Udo Schwartz

Guest
Hi all,

we have started testing Windows 1809 (the re-released version from November 18 of course) and discovered an issue with installing fonts via script.

For years I have used this little VBscript to install true type fonts that are in the current folder where the script resides

Set ofso = CreateObject("Scripting.FileSystemObject")
SourceFolder = ofso.GetParentFolderName(Wscript.ScriptFullName)

Const FONTS = &H14&

Set objShell = CreateObject("Shell.Application")
Set oSource = objShell.Namespace(SourceFolder)
Set oWinFonts = objShell.Namespace(FONTS)

Set rxTTF = New RegExp
rxTTF.IgnoreCase = True
rxTTF.Pattern = "\.ttf$"

FOR EACH FontFile IN oSource.Items()
IF rxTTF.Test(FontFile.Path) THEN
oWinFonts.CopyHere FontFile.Path
END IF
NEXT

This worked flawlessly for years and with all Windows 10 editions including 1803. Now in 1809 the script does not work any more. What I have found out so far is, that in 1809 the script tries to install the fonts inside the userprofile of the user where it is running from.

I discovered that in 1809 there is a new option that allows users to install fonts.

The script above will now always install these fonts in a folder of the current user and registers them in the HKCU, no longer in HKLM (although the script is being run with administrative permissions). IT seems that the default behavior to install fonts has changed in 1809 from admin to user.

Big question: How can I install fonts (systemwide with admin permissions) through a script? Manual installation via GUI works fine, but I need a scripting solution.

What a big mess with 1809 ...

Thanks for helping out

Regards

Udo

More...
 

Similar threads

Back
Top