"CopyOEM.wsf" - Formatierung defekt

Antworten
Benutzeravatar
g-force
Elite
Elite
Beiträge: 2054
Registriert: 07.10.2016, 19:30
Hat sich bedankt: 282 Mal
Danke erhalten: 248 Mal
Gender:

"CopyOEM.wsf" - Formatierung defekt

Beitrag von g-force » 03.07.2023, 13:06

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:

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>
Besonders im eigentlich wichtigen Teil unten habe ich keine Ahnung, ob da Zeilenumbrüche hingehören. Wie bekomme ich das sortiert?
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

Tante Google

"CopyOEM.wsf" - Formatierung defekt

Beitrag von Tante Google » 03.07.2023, 13:06


Benutzeravatar
moinmoin
★ Team Admin ★
Beiträge: 59864
Registriert: 14.11.2003, 11:12
Hat sich bedankt: 131 Mal
Danke erhalten: 587 Mal
Gender:

Re: WSF-Datei - Formatierung defekt

Beitrag von moinmoin » 03.07.2023, 13:15

Ich hab hier ne andere Quelle von 2012 gefunden. Hilft dir das?
https://www.wardvissers.nl/2012/09/12/c ... -update-1/

Benutzeravatar
g-force
Elite
Elite
Beiträge: 2054
Registriert: 07.10.2016, 19:30
Hat sich bedankt: 282 Mal
Danke erhalten: 248 Mal
Gender:

Re: WSF-Datei - Formatierung defekt

Beitrag von g-force » 03.07.2023, 13:37

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:

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

Benutzeravatar
moinmoin
★ Team Admin ★
Beiträge: 59864
Registriert: 14.11.2003, 11:12
Hat sich bedankt: 131 Mal
Danke erhalten: 587 Mal
Gender:

Re: WSF-Datei - Formatierung defekt

Beitrag von moinmoin » 03.07.2023, 13:40

Auch nur über den zip-Namen in " ".

Benutzeravatar
g-force
Elite
Elite
Beiträge: 2054
Registriert: 07.10.2016, 19:30
Hat sich bedankt: 282 Mal
Danke erhalten: 248 Mal
Gender:

Re: "CopyOEM.wsf" - Formatierung defekt

Beitrag von g-force » 04.07.2023, 09:51

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

Benutzeravatar
moinmoin
★ Team Admin ★
Beiträge: 59864
Registriert: 14.11.2003, 11:12
Hat sich bedankt: 131 Mal
Danke erhalten: 587 Mal
Gender:

Re: "CopyOEM.wsf" - Formatierung defekt

Beitrag von moinmoin » 04.07.2023, 10:13

Super. :)

Antworten