Hallo ihr Lieben
Leider komme ich hier nicht mehr weiter:
Dim oFSO, oApp, oFolderCopy, oShell
Dim strFontsPath, strScriptPath
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oShell = CreateObject("WScript.Shell")
Set oApp = CreateObject("Shell.Application")
strScriptPath = Replace(WScript.ScriptFullName, WScript.ScriptName, "")
strFontsPath = oShell.ExpandEnvironmentStrings("%WINDIR%") & "\Fonts"
Set oFolderCopy = oApp.Namespace(strScriptPath & "FontsToInstall")
For Each oFont In oFolderCopy.Items
IF oFSO.FileExists(strFontsPath & "\" & oFont.Name) = True Then
oApp.Namespace(strFontsPath).Delete oFont
oApp.Namespace(strFontsPath).CopyHere oFont
Else
oApp.Namespace(strFontsPath).CopyHere oFont
End If
Next
' Cleanup Objects
Set oFolderCopy = Nothing
Set oApp = Nothing
Set oShell = Nothing
Ich will eigentlich NUR, wenn die Schriftart vorhanden ist, dass er zur nächsten Geht und wenn nicht, dass er Sie in den Ordner Kopiert.
Leider klappt das nicht, denn wenn eine Schriftart vorhanden ist, dann Fragt er mich immer wieder, willst du die Schriftart ersetzen.
Bei 1 Schriftart ja noch ok, aber nicht wenn ich 500 Schriftarten habe und vielleicht 200 bereits auf meinem Computer.
Ich danke euch viel mal für eure Hilfe.
PS: Ich Scripte das erste mal mit VB, also bitte verzeiht wenn es nicht gut aussieht.
LG Majce