Need to install a font on all user’s machines that will use the application I am writing which creates custom documents in Word. It’s a barcode font.
I’ve successfully added the font to my solution and set its build action to Embedded Resource and have also successfully written code to check if the font is already installed on the user’s system.
Now I just need to figure out how to extract the font from my solution and install it onto the user’s machine as if they installed the font themselves for use in Office applications, etc.
Most of the examples I’ve found out there are for using the font within the VB.NET application instead of outside it and the one’s I have found which seem to fit my purpose aren’t working for me.
Copy the font into the Windows font folder and then you need to get the font added to the registry. I’ve not tried this myself, but I think it’s possible to do this by opening the font using the
ShellExecuteAapi in a similar way to as seen here.Here’s a vbscript way of doing it that might be useful as a starting point since you might be able to use similar syntax and functions in VB.Net: Hey, Scripting Guy! How Can I Install Fonts Using a Script?