psexec -u -p
dein problem ist, wie bekommst du das kennwort dahin.
entweder es gibt eine kennung ohne kennwort, oder das kennwort steht im klartext im opsiscript.
da die kennung wahrscheinlich erweiterte rechte benötigt ist beides suboptimal.
was macht fontreg.exe? nur die schriftarten installieren?
das geht via vbs, bzw. mit einer entsprechenden execwith-sektion.
Code: Alles auswählen
ExecWith_install_fonts CScript //nologo //e:vbs PASS "[Pfad zur Font-Datei bzw. zum Ordner mit Font-Dateien]"
Code: Alles auswählen
[ExecWith_install_fonts]
Option Explicit
Dim StrPath, ObjShell, ObjFSO, ObjNameSpace, ObjFolder, ObjFile, ObjFont
StrPath = WScript.Arguments(0)
Set ObjShell = CreateObject("Shell.Application")
Set ObjFSO = CreateObject("Scripting.FilesystemObject")
Set ObjNameSpace = ObjShell.Namespace(StrPath)
If ObjFSO.FolderExists(StrPath) Then
WScript.Echo "Install font files from folder " & StrPath
WScript.Echo " "
Set ObjFolder = ObjFSO.GetFolder(StrPath)
For Each ObjFile In ObjFolder.Files
If LCase(Right(ObjFile,4)) = ".ttf" OR LCase(Right(ObjFile,4)) = ".otf" Then
If ObjFSO.FileExists("C:\Windows\Fonts\" & ObjFile.Name) Then
WScript.Echo "Font already installed: " & ObjFile.Name
Else
Set ObjFont = ObjNameSpace.ParseName(ObjFile.Name)
ObjFont.InvokeVerb("Install")
WScript.Echo "Installed Font: " & ObjFile.Name
Set ObjFont = Nothing
End If
End If
Next
ElseIf ObjFSO.FileExists(StrPath) Then
WScript.Echo "Install font file " & StrPath
WScript.Echo " "
Set ObjFile = ObjFSO.GetFile(StrPath)
If LCase(Right(ObjFile,4)) = ".ttf" OR LCase(Right(ObjFile,4)) = ".otf" Then
If ObjFSO.FileExists("C:\Windows\Fonts\" & ObjFile.Name) Then
WScript.Echo "Font already installed: " & ObjFile.Name
Else
Set ObjFont = ObjNameSpace.ParseName(ObjFile.Name)
ObjFont.InvokeVerb("Install")
WScript.Echo "Installed Font: " & ObjFile.Name
Set ObjFont = Nothing
End If
End If
Else
WScript.Echo "Source path does not exist"
End If
die schriftarten werden durch die installation automatisch nach C:\Windows\Fonts kopiert,
sprich du gibts als quelle den pfad in deinem scriptverzeichnis an.