bl双性强迫侵犯h_国产在线观看人成激情视频_蜜芽188_被诱拐的少孩全彩啪啪漫画

域環境users提權調用lsrunase.exe批處理完成安裝字體

字體安裝2.0
由于字體安裝之前的批處理采用字體文件復制到c:\windows\fonts下再注冊注冊表的方式,一部分字體安裝不上,重新修改了批處理方式。

為喀左等地區用戶提供了全套網頁設計制作服務,及喀左網站建設行業解決方案。主營業務為成都做網站、成都網站設計、喀左網站設計,以傳統方式定制建設網站,并提供域名空間備案等一條龍服務,秉承以專業、用心的態度為用戶提供真誠的服務。我們深信只要達到每一位用戶的要求,就會得到認可,從而選擇與我們長期合作。這樣,我們也可以走得更遠!

一. 字體安裝批處理
1.vbs腳本運行安裝D:\fonts下的字體安裝包,安裝時fonts.vbs同時會檢測C:\windows\fonts\字體名稱與D:\fonts里的字體名是否一致,如果存在則忽略掉。缺點:若是表面字體名不一致,會提示重復安裝,手動單擊選擇即可。
參考的事例:
http://blog.jasondahmen.com/2011/11/24/the-true-ultimate-font-install-for-windows-7-and-xp-vbs/
代碼如下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

注意:安裝只包含ttf,otf,ttc三種字體文件,可以自己在代碼加字體后綴( If LCase(right(objFile,4)) = ".ttf" OR LCase(right(objFile,4)) = ".otf" OR LCase(right(objFile,4)) = ".ttc" Then),滿足95%,特殊類型的字體安裝再擴展。

  1. 使用vbs封裝成exe文件工具,封裝vbs腳本,命名可執行文件的fonts.exe。
    (bat不能直接運行VBS,水平有限直接做成了exe來執行)
    下載地址:https://download.csdn.net/download/qq_16066381/9760279

域環境users提權調用lsrunase.exe 批處理完成安裝字體

二.使用Quick_Batch_File_Compiler封裝以管理員運行的批處理.批處理用到lsrunas.exe加密域管理員密碼來運行fonts.exe

  1. 代碼: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 利用lsrunase調用域管理員權限來運行本地自解壓文件完成軟件安裝rem 利用lsrunase調用域管理員權限來運行本地自解壓文件完成軟件安裝

參考lsrunase.exe
https://www.cnblogs.com/colinliu/p/5666715.html

2.Quick_Batch_File_Compiler封裝命名為 雙擊本軟件_安裝字體.exe

三.介于軟件bug,做了其他輔助性的批處理來完善使用
字體提示已安裝太多情況1.強制結束安裝進程,2.清理fonts下已安裝的字體

11強制結束_安裝字體.bat
@echo off
taskkill /f /im fonts.exe
結束字體安裝進程

12刪除以前的文件里的字體安裝文件.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 刪除字體

Desk.bat 刪除之前的快捷方式,創建新的快捷方式,并運行完刪除自己
@echo off
copy /y "D:\fonts\安裝字體.lnk" c:\users\public\desktop
rem 在公共桌面創建快捷方式
ping 127.1 -n 2 >nul
del D:\fonts\安裝字體.lnk
del /f /q /a /s %0
rem 刪除批處理本身

四.封裝自解壓
自解壓的封裝方法百度一下。
域環境users提權調用lsrunase.exe 批處理完成安裝字體

1.解壓后的Fonts.exe 屬性隱藏,防止誤刪
2.注意命名的安裝軟件排在所有文件前面。字體文件很多情況下,會造成找不到
域環境users提權調用lsrunase.exe 批處理完成安裝字體

五.宣導,或者編輯安裝方法文檔。

當前文章:域環境users提權調用lsrunase.exe批處理完成安裝字體
文章源于:http://vcdvsql.cn/article46/gjochg.html

成都網站建設公司_創新互聯,為您提供網站建設App設計網站設計公司網站制作品牌網站建設App開發

廣告

聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯

小程序開發