Create a script file called InstallFonts.vbs in my case I put it in C:\PortableApps\InstallFonts\
IN the below code replace "SomeUser" with the username of the person you want to be able to install fonts. Then make the Appropriate "install Fonts" folder on their desktop.
Set ofso = CreateObject("Scripting.FileSystemObject")
'SourceFolder = ofso.GetParentFolderName(Wscript.ScriptFullName)
SourceFolder = "C:\Users\SomeUser\Desktop\Install Fonts"
Const FONTS = &H14&
Set objShell = CreateObject("Shell.Application")
Set oSource = objShell.Namespace(SourceFolder)
Set oWinFonts = objShell.Namespace(FONTS)
' Lame VBscript needs 4 f*ing lines instead of "if (/\.ttf$/i) " ...
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
Now create a shortcut on their desktop that is as follows...
C:\Windows\System32\runas.exe /user:Administrator /savecred "wscript C:\PortableApps\InstallFonts\InstallFonts.vbs"
Note that I used "Administrator". I enabled it and assigned it a password. I suppose you could use any administrator account for this.
First time you run the shortcut you will be prompted for the administrator password.. every time after it will just work.
If it does not prompt you for a password run the shortcut from a cmd prompt it should prompt you then.
I cannot promise you how secure this is as in if they could use it to run elevated code. However it is a solution.
Related: http://stackoverflow.com/questions/28687666/installing-font-and-making-windows-aware
– Jerry Dodge – 2015-02-24T15:07:50.843