In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Font installation 2.0
Because the batch processing before font installation uses the way that the font file is copied to c:\ windows\ fonts and then registers the registry, some fonts cannot be installed, so the batch mode is modified again.
one。 Font installation batch
The 1.vbs script runs and installs the font installation package under D:\ fonts. During installation, fonts.vbs will also check whether the font name in C:\ windows\ fonts\ is consistent with the font name in D:\ fonts, and ignore it if it exists. Disadvantages: if the font name is not consistent on the surface, you will be prompted to repeat the installation, and click to select it manually.
Examples of reference:
Http://blog.jasondahmen.com/2011/11/24/the-true-ultimate-font-install-for-windows-7-and-xp-vbs/
The code is as follows: fonts.vbs
Option Explicit
'Installing multiple Fonts in Windows 7
'http://www.cloudtec.ch 2011
'Edited by Jason Dahmen
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 = "D:\ fonts\"
If objFSO.FolderExists (strFontSourcePath) Then
If objFSO.FolderExists ("C:\ Users\") Then
'Start Windows 7/Vista
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" OR LCase (right (objFile,4)) = ".ttc" Then
Set objFont = objNameSpace.ParseName (objFile.Name)
If objFSO.FileExists ("C:\ WINDOWS\ Fonts\" & objFile.Name) = False Then
ObjFont.InvokeVerb ("Install")
Set objFont = Nothing
Else
End If
End If
Next
Else
'Start Windows XP
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" OR LCase (right (objFile,4)) = ".ttc" Then
Set objFont = objNameSpace.ParseName (objFile.Name)
If objFSO.FileExists ("C:\ WINDOWS\ Fonts\" & objFile.Name) = False Then
ObjFSO.CopyFile "D:\ fonts*", "c:\ windows\ fonts\"
Set objFont = Nothing
Else
End If
End If
Next
End If
Else
Wscript.Echo "Font Source Path does not exists"
End IF
Note: the installation contains only three ttf,otf,ttc font files. You can add the font suffix (If LCase (right (objFile,4)) = ".ttf" OR LCase (right (objFile,4)) = ".otf" OR LCase (right (objFile,4)) = ".ttc" Then) in the code to meet 95%. Special types of fonts can be installed and extended.
Use vbs to encapsulate the exe file tool, package the vbs script, and name the fonts.exe of the executable file.
(bat cannot run VBS directly, the limited level directly makes exe to execute)
Download address: https://download.csdn.net/download/qq_16066381/9760279
Batch processing run by an administrator using Quick_Batch_File_Compiler encapsulation. The batch uses the lsrunas.exe encrypted domain administrator password to run fonts.exe
Code: Fonts-intsall.bat
@ echo off
If "% 1" = = "h" goto begin
Start mshta _ vbscript:createobject ("wscript.shell"). Run (""% ~ nx0 "" h ", 0) (window.close) & & exit
: begin
\ 10.10.12.201\ soft\ install\ lsrunase\ lsrunase.exe / user:administrator / password:3lp9huRP3uydxg== / domain:zzecwwmir.com / command:d:\ fonts\ fonts.exe / runpath:d:\ fonts\
Rem uses lsrunase call domain administrator privileges to run local self-extracting files to complete software installation rem uses lsrunase call domain administrator privileges to run local self-extracting files to complete software installation
Reference lsrunase.exe
Https://www.cnblogs.com/colinliu/p/5666715.html
2.Quick_Batch_File_Compiler package named double-click this software _ install font .exe
Third, due to the software bug, other auxiliary batches are done to improve the use.
Font prompt has been installed too many cases 1. Force the end of the installation process, 2. Clean up installed fonts under fonts
11 forced end _ install Font .bat
@ echo off
Taskkill / f / im fonts.exe
End the font installation process
Delete the font installation file from the previous file. bat
@ echo off
Del / f / Q / a / s D:\ fonts*.otf
Del / f / Q / a / s D:\ fonts*.ttf
Del / f / Q / a / s D:\ fonts*.fon
Del / f / Q / a / s D:\ fonts*.ttc
Rem delete fonts
Desk.bat deletes previous shortcuts, creates new shortcuts, and deletes itself after running
@ echo off
Copy / y "D:\ fonts\ install font .lnk" c:\ users\ public\ desktop
Rem creates shortcuts on public desktops
Ping 127.1-n 2 > nul
Del D:\ fonts\ install font .lnk
Del / f / Q / a / s 0
Rem deletes the batch itself
Four. package self-decompression
Self-decompressing packaging method Baidu.
1. Hide the extracted Fonts.exe attribute to prevent erroneous deletion
two。 Note that the named installation software comes before all files. In many cases, font files can not be found.
Five. promote or edit the installation method document.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.