From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically Installing Fonts in Windows 10

I'm trying to programmatically install a custom font. The code to do this is almost there - see attachment.

I followed the instructions in this article.

There have been other discussions on this here and here; I don't believe it's been clearly solved; it's not as simple as placing the font file in the Windows Font folder; the article explains it well.

Unfortunately, I get an undefined error when I run the code. I am hoping someone here will take a look and realize something I'm overlooking to do.

Thanks in advance !

0 Kudos
Message 1 of 2
(2,721 Views)

Not sure why that doesn't work, but ActiveX is not really the way to go unless it can't be avoided.

 

I'd try this (command line): https://stackoverflow.com/questions/21986744/how-to-install-a-font-programatically-c

 

Or .net, as in the attached VI (apparently, System.IO.File.Copy does install the font).

 

 
Both untested. Use at you're own risk.
0 Kudos
Message 2 of 2
(2,684 Views)