"CopyOEM.wsf" - Formatierung defekt
- g-force
- Elite
- Beiträge: 2092
- Registriert: 07.10.2016, 19:30
- Hat sich bedankt: 289 Mal
- Danke erhalten: 260 Mal
- Gender:
"CopyOEM.wsf" - Formatierung defekt
Ich habe hier eine "CopyOEM.wsf" aus dem Netz, die ein Bestandteil von MDT ist bzw. werden soll. Es existiert ein Thread vom Autor des Scripts hier: https://techcommunity.microsoft.com/t5/ ... a-p/706642 Leider kann ich dort das Script nicht erfogreich herunterladen (angeblich leeres Archiv).
Es gibt einen weiteren Thread, wo das Script ersehbar ist, leider ist da aber die Formatierung völlig verrutscht bzw. nicht vorhanden (Script to Copy OEM Folders in MDT): https://www.forakin.org/p/script-holder.html
Ich habe nun versucht, die Formatierung gemäß XML wiederherzustellen, was aber bisher nicht klappt (Fehler im MDT wird angezeigt, Script kann nicht ausgeführt werden). Hier mein aktueller Stand:
Besonders im eigentlich wichtigen Teil unten habe ich keine Ahnung, ob da Zeilenumbrüche hingehören. Wie bekomme ich das sortiert?
Es gibt einen weiteren Thread, wo das Script ersehbar ist, leider ist da aber die Formatierung völlig verrutscht bzw. nicht vorhanden (Script to Copy OEM Folders in MDT): https://www.forakin.org/p/script-holder.html
Ich habe nun versucht, die Formatierung gemäß XML wiederherzustellen, was aber bisher nicht klappt (Fehler im MDT wird angezeigt, Script kann nicht ausgeführt werden). Hier mein aktueller Stand:
Code: Alles auswählen
<job id="CopyOEM">
<script language="VBScript" src="ZTIDiskUtility.vbs"/>
<script language="VBScript" src="ZTIUtility.vbs"/>
<script language="VBScript">
' // ***************************************************************************
' //
' // File: CopyOEM.wsf
' //
' // Author: Michael Niehaus
' //
' // Version: 1.0
' //
' // Purpose: Copy $OEM$\$1 and $OEM$\$$ files to the current OS. This script
' // is designed to run in Windows PE right after the "Install OS"
' // step.
' //
' // Usage: cscript CopyOEM.wsf [/debug:true]
' //
' // ***************************************************************************
' ------------- DISCLAIMER -------------------------------------------------
' This script code is provided as is with no guarantee or waranty concerning
' the usability or impact on systems and may be used, distributed, and
' modified in any way provided the parties agree and acknowledge the
' Microsoft or Microsoft Partners have neither accountabilty or
' responsibility for results produced by use of this script. '
' Microsoft will not provide any support through any means.
' ------------- DISCLAIMER -------------------------------------------------
Dim sOEM, sDestinationDrive
' Find the OEM path
If oFSO.FolderExists(oEnvironment.Item("DeployRoot") & "\Control\" & oEnvironment.Item("TaskSequenceID") & "\$OEM$") then sOEM = oEnvironment.Item("DeployRoot") & "\Control\" & oEnvironment.Item("TaskSequenceID") & "\$OEM$" ElseIf oFSO.FolderExists(oEnvironment.Item("SourcePath") & "\$OEM$") then sOEM = oEnvironment.Item("SourcePath") & "\$OEM$" ElseIf oFSO.FolderExists(oEnvironment.Item("DeployRoot") & "\" & oEnvironment.Item("Architecture") & "\$OEM$") then sOEM = oEnvironment.Item("DeployRoot") & "\" & oEnvironment.Item("Architecture") & "\$OEM$" ElseIf oFSO.FolderExists(oEnvironment.Item("DeployRoot") & "\$OEM$") then sOEM = oEnvironment.Item("DeployRoot") & "\$OEM$" Else sOEM = "" End if
' Copy the OEM content ($1, $$) to the right place
sDestinationDrive = oUtility.GetOSTargetDriveLetter If oFSO.FolderExists(sOEM & "\$1") then oLogging.CreateEntry "Copying from " & sOEM & "\$1 to " & sDestinationDrive, LogTypeInfo oFSO.CopyFolder sOEM & "\$1", sDestinationDrive, true End if If oFSO.FolderExists(sOEM & "\$$") then oLogging.CreateEntry "Copying from " & sOEM & "\$$ to " & sDestinationDrive & "\Windows", LogTypeInfo oFSO.CopyFolder sOEM & "\$$", sDestinationDrive & "\Windows", true End if
</script>
</job>
Zuletzt geändert von g-force am 03.07.2023, 13:43, insgesamt 1-mal geändert.
Windows VISTA x64 - Integration ALLER Updates: viewtopic.php?t=29624
Windows 7 x86/x64 - Integration ALLER Updates: viewtopic.php?t=26485
Windows 8.1 x86/x64 - Integration ALLER Updates: viewtopic.php?t=28193
Windows XP x86/x64 ISO mit allen Updates: viewtopic.php?t=28348
Windows XP x86/x64 - Setup von WIM (XP2ESD): viewtopic.php?t=28372
Windows 7 x86/x64 - Integration ALLER Updates: viewtopic.php?t=26485
Windows 8.1 x86/x64 - Integration ALLER Updates: viewtopic.php?t=28193
Windows XP x86/x64 ISO mit allen Updates: viewtopic.php?t=28348
Windows XP x86/x64 - Setup von WIM (XP2ESD): viewtopic.php?t=28372
-
Tante Google
- moinmoin
- ★ Team Admin ★
- Beiträge: 60121
- Registriert: 14.11.2003, 11:12
- Hat sich bedankt: 136 Mal
- Danke erhalten: 617 Mal
- Gender:
Re: WSF-Datei - Formatierung defekt
Ich hab hier ne andere Quelle von 2012 gefunden. Hilft dir das?
https://www.wardvissers.nl/2012/09/12/c ... -update-1/
https://www.wardvissers.nl/2012/09/12/c ... -update-1/
- g-force
- Elite
- Beiträge: 2092
- Registriert: 07.10.2016, 19:30
- Hat sich bedankt: 289 Mal
- Danke erhalten: 260 Mal
- Gender:
Re: WSF-Datei - Formatierung defekt
Das sieht schonmal ganz gut aus im Script. Ich bin echt erstaunt @moinmoin, wie Du so schnell diesen Link gefunden hast - ich habe gestern abend mehrere Stunden gesucht und diesen Link nicht gefunden! Vielen Dank!
EDIT:
Ich kopieren das Script mal für die Nachwelt hier rein:
EDIT:
Ich kopieren das Script mal für die Nachwelt hier rein:
Code: Alles auswählen
<job id="CopyOEM">
<script language="VBScript" src="ZTIDiskUtility.vbs"/>
<script language="VBScript" src="ZTIUtility.vbs"/>
<script language="VBScript">
' // ***************************************************************************
' //
' // File: CopyOEM.wsf
' //
' // Author: Michael Niehaus
' //
' // Version: 1.0
' //
' // Purpose: Copy $OEM$\$1 and $OEM$\$$ files to the current OS. This script
' // is designed to run in Windows PE right after the "Install OS"
' // step.
' //
' // Usage: cscript CopyOEM.wsf [/debug:true]
' //
' // ***************************************************************************
' ------------- DISCLAIMER -------------------------------------------------
' This script code is provided as is with no guarantee or waranty concerning
' the usability or impact on systems and may be used, distributed, and
' modified in any way provided the parties agree and acknowledge the
' Microsoft or Microsoft Partners have neither accountabilty or
' responsibility for results produced by use of this script.
'
' Microsoft will not provide any support through any means.
' ------------- DISCLAIMER -------------------------------------------------
Dim sOEM, sDestinationDrive
' Find the OEM path
If oFSO.FolderExists(oEnvironment.Item("DeployRoot") & "\Control\" & oEnvironment.Item("TaskSequenceID") & "\$OEM$") then
sOEM = oEnvironment.Item("DeployRoot") & "\Control\" & oEnvironment.Item("TaskSequenceID") & "\$OEM$"
ElseIf oFSO.FolderExists(oEnvironment.Item("SourcePath") & "\$OEM$") then
sOEM = oEnvironment.Item("SourcePath") & "\$OEM$"
ElseIf oFSO.FolderExists(oEnvironment.Item("DeployRoot") & "\" & oEnvironment.Item("Architecture") & "\$OEM$") then
sOEM = oEnvironment.Item("DeployRoot") & "\" & oEnvironment.Item("Architecture") & "\$OEM$"
ElseIf oFSO.FolderExists(oEnvironment.Item("DeployRoot") & "\$OEM$") then
sOEM = oEnvironment.Item("DeployRoot") & "\$OEM$"
Else
sOEM = ""
End if
' Copy the OEM content ($1, $$) to the right place
sDestinationDrive = oUtility.GetOSTargetDriveLetter
If oFSO.FolderExists(sOEM & "\$1") then
oLogging.CreateEntry "Copying from " & sOEM & "\$1 to " & sDestinationDrive, LogTypeInfo
oFSO.CopyFolder sOEM & "\$1", sDestinationDrive, true
End if
If oFSO.FolderExists(sOEM & "\$$") then
oLogging.CreateEntry "Copying from " & sOEM & "\$$ to " & sDestinationDrive & "\Windows", LogTypeInfo
oFSO.CopyFolder sOEM & "\$$", sDestinationDrive & "\Windows", true
End if
</script>
</job>
Windows VISTA x64 - Integration ALLER Updates: viewtopic.php?t=29624
Windows 7 x86/x64 - Integration ALLER Updates: viewtopic.php?t=26485
Windows 8.1 x86/x64 - Integration ALLER Updates: viewtopic.php?t=28193
Windows XP x86/x64 ISO mit allen Updates: viewtopic.php?t=28348
Windows XP x86/x64 - Setup von WIM (XP2ESD): viewtopic.php?t=28372
Windows 7 x86/x64 - Integration ALLER Updates: viewtopic.php?t=26485
Windows 8.1 x86/x64 - Integration ALLER Updates: viewtopic.php?t=28193
Windows XP x86/x64 ISO mit allen Updates: viewtopic.php?t=28348
Windows XP x86/x64 - Setup von WIM (XP2ESD): viewtopic.php?t=28372
- moinmoin
- ★ Team Admin ★
- Beiträge: 60121
- Registriert: 14.11.2003, 11:12
- Hat sich bedankt: 136 Mal
- Danke erhalten: 617 Mal
- Gender:
- g-force
- Elite
- Beiträge: 2092
- Registriert: 07.10.2016, 19:30
- Hat sich bedankt: 289 Mal
- Danke erhalten: 260 Mal
- Gender:
Re: "CopyOEM.wsf" - Formatierung defekt
Kurze Rückmeldung: Das Script funktioniert und tut, was es soll.
Windows VISTA x64 - Integration ALLER Updates: viewtopic.php?t=29624
Windows 7 x86/x64 - Integration ALLER Updates: viewtopic.php?t=26485
Windows 8.1 x86/x64 - Integration ALLER Updates: viewtopic.php?t=28193
Windows XP x86/x64 ISO mit allen Updates: viewtopic.php?t=28348
Windows XP x86/x64 - Setup von WIM (XP2ESD): viewtopic.php?t=28372
Windows 7 x86/x64 - Integration ALLER Updates: viewtopic.php?t=26485
Windows 8.1 x86/x64 - Integration ALLER Updates: viewtopic.php?t=28193
Windows XP x86/x64 ISO mit allen Updates: viewtopic.php?t=28348
Windows XP x86/x64 - Setup von WIM (XP2ESD): viewtopic.php?t=28372