Hi,
Forgive me if I seem thick... I am not a programmer...
Im trying to achieve a simple task:
I have five fonts I need to install on many clients, some have none, one, or more of the fonts already installed. I have found the VBScript code to do the installation of one, and to check if the file already exists in the FONTS-folder.
I would like to extend this to check if the file does NOT exist, then install it, and do this with five fonts. I have found that I should use Select - Case, but I can not, for the love of everything sacred, figure out how I should construct the code.
Can someone help me?
Best Regards/
John-Henri
Forgive me if I seem thick... I am not a programmer...
Im trying to achieve a simple task:
I have five fonts I need to install on many clients, some have none, one, or more of the fonts already installed. I have found the VBScript code to do the installation of one, and to check if the file already exists in the FONTS-folder.
Code:
Const FONTS = &H14&
Set objShell = CreateObject("Shell.Application")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objShell.Namespace(FONTS)
If objFSO.FileExists("C:\Windows\Fonts\spranq_eco_sans_regular.ttf") Then
Wscript.Quit
Else
objFolder.CopyHere "\\192.168.104.225\sysvol\EcoFont\spranq_eco_sans_regular.ttf"
End If
I would like to extend this to check if the file does NOT exist, then install it, and do this with five fonts. I have found that I should use Select - Case, but I can not, for the love of everything sacred, figure out how I should construct the code.
Can someone help me?
Best Regards/
John-Henri