forked from kuddman/ubuntu-bash-layout-for-windows
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.vbs
More file actions
executable file
·32 lines (25 loc) · 1.02 KB
/
install.vbs
File metadata and controls
executable file
·32 lines (25 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Option Explicit
Dim objShell, objFSO, wshShell
Dim strFontSourcePath, objFolder, objFont, objNameSpace, objFile
Set objShell = CreateObject("Shell.Application")
Set wshShell = CreateObject("WScript.Shell")
Set objFSO = createobject("Scripting.Filesystemobject")
strFontSourcePath = Replace(WScript.ScriptFullName, WScript.ScriptName, "")
If objFSO.FolderExists(strFontSourcePath) Then
Set objNameSpace = objShell.Namespace(strFontSourcePath)
Set objFolder = objFSO.getFolder(strFontSourcePath)
For Each objFile In objFolder.files
If LCase(right(objFile,4)) = ".ttf" OR LCase(right(objFile,4)) = ".otf" Then
If objFSO.FileExists(wshShell.SpecialFolders("Fonts") & objFile.Name) = False Then
Set objFont = objNameSpace.ParseName(objFile.Name)
objFont.InvokeVerb("Install")
Set objFont = Nothing
End If
End If
Next
Else
'Wscript.Echo "Font Source Path does not exists"
End If
'
Set objShell = CreateObject("Wscript.shell")
objShell.run("powershell -executionpolicy bypass -file .\change_font_colors.ps1")