asyniur | Bonjour à tous Je vous explique rapidement mon problème: J'aimerai pouvoir gérer plus facilement mes drivers dans mon système de déploiement utilisant MDT 2012.
J'ai trouver une solution qui semble bien sur internet consistant à ajouter un menu "drivers" dans le wizard de déploiement. Seul hic, je n'arrive pas à faire marcher le code (Erreur à la ligne 187 du wizard.hta) .
Qui correspond à çà:
Code :
- For each refItem in oReference.SelectSingleNode("//Wizard/Pane" ).ChildNodes
- item.AppendChild refItem.CloneNode(true)
- Next
|
La page d'origine est : http://mschumacherr.tumblr.com/pos [...] roblem-new
Après divers essai, j'ai essayer de corriger quelques trucs dans le code (des espaces en plus ou en moins etc) mais je ne suis absolument pas programmeur et la je cale .
Voila ou j'en suis: DeployWiz_Definition_ENU.xml
Code :
- <?xml version="1.0" encoding="utf-8" ?>
- <!--
- ' // ***************************************************************************
- ' //
- ' // Copyright (c) Microsoft Corporation. All rights reserved.
- ' //
- ' // Microsoft Deployment Toolkit Solution Accelerator
- ' //
- ' // File: DeployWiz_Definition_ENU.wsf
- ' //
- ' // Version: 6.0.2223.0
- ' //
- ' // Purpose: Main Client Deployment Wizard Defintion File
- ' //
- ' // ***************************************************************************
- -->
- <Wizard>
- <Global>
- <CustomStatement><![CDATA[ document.title = "Windows Deployment Wizard" ]]> </CustomStatement>
- <Initialization>DeployWiz_Initialization.vbs</Initialization>
- <Validation>DeployWiz_Validation.vbs</Validation>
- </Global>
- <!-- ************************************************************** -->
- <!-- ************************************************************** -->
- <Pane id="SelectTaskSequence" reference="DeployWiz_SelectTS.xml">
- <Condition><![CDATA[UCASE(Property("SkipTaskSequence" ))<>"YES" ]]></Condition>
- </Pane>
- <Pane id="ComputerName" reference="DeployWiz_ComputerName.xml">
- <Condition><![CDATA[UCase(Property("SkipDomainMembership" ))<>"YES" or UCase(Property("SkipComputerName" ))<>"YES"]]></Condition>
- <Condition><![CDATA[Property("DeploymentType" )<>"REPLACE" and Property("DeploymentType" )<>"CUSTOM" and Property("DeploymentType" ) <> "StateRestore" ]]></Condition>
- </Pane>
- <Pane id="UserData" reference="DeployWiz_UserData.xml">
- <Condition><![CDATA[ (Property("DeploymentType" ) = "REFRESH" or Property("DeploymentType" ) = "REPLACE" ) and UCase(Property("SkipUserData" ))<>"YES" and Property("DeploymentType" ) <> "StateRestore"]]></Condition>
- <Condition><![CDATA[ Instr(1, oEnvironment.Item("ImageFlags" ), "SERVER", 1) = 0 ]]></Condition>
- <Condition><![CDATA[ ucase(oEnvironment.Item("IsServerOS" )) <> "TRUE" ]]></Condition>
- <Condition><![CDATA[ FindTaskSequenceStep("//step[@name='Capture User State']", "ZTIUserState.wsf" ) ]]></Condition>
- </Pane>
- <Pane id="UserDataRestore" reference="DeployWiz_UserDataRestore.xml">
- <Condition><![CDATA[ UCase(Property("SkipUserData" ))<>"YES" and (Property("DeploymentType" )="NEWCOMPUTER" or Property("DeploymentType" ) = "StateRestore" ) and Property("DeploymentType" )<>"CUSTOM" ]]></Condition>
- <Condition><![CDATA[ Instr(1, oEnvironment.Item("ImageFlags" ), "SERVER", 1) = 0 ]]></Condition>
- <Condition><![CDATA[ ucase(oEnvironment.Item("IsServerOS" )) <> "TRUE" ]]></Condition>
- <Condition><![CDATA[ FindTaskSequenceStep("//step[@name='Restore User State']", "ZTIUserState.wsf" ) ]]></Condition>
- </Pane>
- <Pane id="ComputerBackup" reference="DeployWiz_ComputerBackup.xml">
- <Condition><![CDATA[ Property("DeploymentType" ) <> "NEWCOMPUTER" and Property("DeploymentType" ) <> "CUSTOM" and Property("DeploymentType" ) <> "STATERESTORE" and (Property("DeploymentType" ) = "REFRESH" or Property("DeploymentType" ) = "REPLACE" ) and UCase(Property("SkipComputerBackup" ))<>"YES"]]></Condition>
- </Pane>
- <Pane id="ProductKey" reference="DeployWiz_ProductKeyVista.xml">
- <Condition><![CDATA[ UCASE(Property("SkipProductKey" ))<>"YES" and Property("DeploymentType" )<>"REPLACE" and Property("DeploymentType" )<>"CUSTOM" and Property("DeploymentType" )<>"StateRestore" ]]></Condition>
- </Pane>
- <Pane id="SelectLanguagePack" reference="DeployWiz_LanguagePack.xml">
- <Condition><![CDATA[ ucase(Property("SkipPackageDisplay" )) <> "YES" and Property("DeploymentType" )<>"REPLACE" and Property("DeploymentType" )<>"CUSTOM" and Left(Property("ImageBuild" ), 1) = "6" ]]> </Condition>
- <Condition><![CDATA[ FindTaskSequenceStep("//step[@type='BDD_InstallUpdatesOffline' and @name='Apply Patches']", "ZTIPatches.wsf" ) ]]> </Condition>
- <Condition><![CDATA[ CanDisplayPackageDialogBox ]]> </Condition>
- </Pane>
- <Pane id="SelectLanguageUI" reference="DeployWiz_LanguageUI.xml">
- <Condition><![CDATA[ UCase(Property("SkipLocaleSelection" )) <> "YES" or UCase(Property("SkipTimeZone" ))<>"YES" ]]> </Condition>
- <Condition><![CDATA[ Property("DeploymentType" )<>"REPLACE" and Property("DeploymentType" )<>"CUSTOM" and Property("DeploymentType" ) <> "StateRestore" ]]> </Condition>
- </Pane>
- <Pane id="ApplicationSelection" reference="DeployWiz_Applications.xml">
- <Condition><![CDATA[ UCase(Property("DeploymentType" ))<>"REPLACE" ]]></Condition>
- <Condition><![CDATA[ UCase(Property("SkipApplications" ))<>"YES" ]]></Condition>
- <Condition><![CDATA[ IsThereAtLeastOneApplicationPresent ]]></Condition>
- </Pane>
- <Pane id="AdministratorPassword" reference="DeployWiz_AdminPassword.xml">
- <Condition><![CDATA[ UCase(Property("SkipAdminPassword" ))<>"YES" and UCase(Property("DeploymentType" ))<>"REPLACE" and UCase(Property("TaskSequenceTemplate" )) <> "LTIOEM.XML"]]></Condition>
- </Pane>
- <Pane id="AdministratorAccounts" reference="DeployWiz_AdminAccounts.xml">
- <Condition><![CDATA[ UCase(Property("SkipAdminAccounts" )) = "NO" and UCase(Property("DeploymentType" ))<>"REPLACE" and Property("DeploymentType" )<>"CUSTOM" and Property("JoinDomain" ) <> "" ]]></Condition>
- </Pane>
- <Pane id="CaptureImage" reference="DeployWiz_CaptureImage.xml">
- <Condition><![CDATA[ Ucase(Property("SkipCapture" ))<>"YES" and Property("DeploymentType" ) <> "REFRESH" and Property("JoinDomain" ) = "" and Property("DeploymentType" ) <> "REPLACE"]]></Condition>
- <Condition><![CDATA[ FindTaskSequenceStep("//step[@name='Create WIM']", "ZTIBackup.wsf" ) ]]></Condition>
- </Pane>
- <Pane id="BitLocker" reference="DeployWiz_BitLocker.xml">
- <Condition><![CDATA[ Property("DeploymentType" )<>"REPLACE" and Property("DeploymentType" )<>"CUSTOM" and UCase(Property("SkipBitLocker" )) <> "YES" and UCase(Property("DoCapture" )) <> "YES" and UCase(Property("DoCapture" )) <> "PREPARE" ]]></Condition>
- <Condition><![CDATA[ Left(Property("ImageBuild" ), 1) = "6" and oUtility.IsHighEndSKUEx( oEnvironment.Item("ImageFlags" ) ) ]]></Condition>
- </Pane>
- <Pane id="Credentials" reference="DeployWiz_Credentials.xml">
- <Condition><![CDATA[ ((UserID_isDirty = TRUE or Property("UserID" )="" ) or (Property("UserPassword" )="" ) or (Property("UserDomain" ) = Property("OSDComputerName" ))) and Property("DeploymentMethod" ) <> "MEDIA"]]></Condition>
- </Pane>
- <Pane id="Ready" reference="DeployWiz_Ready.xml">
- <Condition><![CDATA[ ucase(Property("SkipSummary" )) <> "YES"]]></Condition>
- </Pane>
- <Pane id="Drivers" reference="DeployWiz_Drivers.xml">
- <Condition><![CDATA[ FindTaskSequenceStep("//step[@type='BDD_InjectDrivers' and @name='Inject Drivers']", "ZTIDrivers.wsf" ) ]]></Condition>
- </Pane>
- </Wizard>
|
DeployWiz_Drivers.xml
Code :
- <?xml version=”1.0” encoding=”utf-8” ?>
- <!—
- ’ // ***************************************************************************
- ’ //
- ’ // Copyright (c) Microsoft Corporation. All rights reserved.
- ’ //
- ’ // Microsoft Deployment Toolkit Solution Accelerator
- ’ //
- ’ // File: DeployWiz_Drivers.xml
- ’ //
- ’ // Version: 1.0.0.0
- ’ //
- ’ // Purpose: Main Client Deployment Wizard Defintion File
- ’ //
- ’ // ***************************************************************************
- —>
- <Wizard>
- <Global>
- <CustomScript>DeployWiz_Initialization.vbs</CustomScript>
- <CustomScript>DeployWiz_Drivers.vbs</CustomScript>
- </Global>
- <Pane id=”Drivers” title=”Drivers”>
- <Body>
- <![CDATA[
- <H1>Inject Drivers</H1>
- <p>Select a profile:</br>
- <select id=”DriverSelectionProfile” NAME=DriverSelectionProfile language=vbscript onchange=”SetDriverProfile”>
- </select>
- </p>
- ]]>
- </Body>
- <Initialization><![CDATA[OutputProfileList]]></Initialization>
- </Pane>
- </Wizard>
|
DeployWiz_Drivers.vbs
Code :
- ’ // ***************************************************************************
- ’ //
- ’ // Copyright (c) Microsoft Corporation. All rights reserved.
- ’ //
- ’ // Microsoft Deployment Toolkit Solution Accelerator
- ’ //
- ’ // File: DeployWiz_Drivers.vbs
- ’ //
- ’ // Version: 1.0.0.0
- ’ //
- ’ // Purpose: Deployment Wizard driver initialization routines
- ’ //
- ’ // ***************************************************************************
- Option Explicit
- ’ Function for creating a drop own list of driver selection profiles
- Function OutputProfileList
- Dim sFile
- Dim sPath
- Dim sProfileList
- Dim sHTMLcode
- Dim sOption
- Dim x
- ’ Find the path to Profiles.xml
- oUtility.FindFile “SelectionProfiles.xml”, sPath
- ’ Load values from Profiles.xml
- Set sFile = CreateObject(“Msxml2.DOMDocument”)
- sFile.load sPath
- Set sProfileList = sFile.getElementsByTagName(“Name”)
- ’ Output Profile names as options
- If sProfileList.length > 0 then
- For each x in sProfileList
- Set sOption = document.createElement(“OPTION”)
- sOption.text = x.Text
- sOption.Value = x.Text
- document.getElementByID(“DriverSelectionProfile”).Add(sOption)
- Next
- Else
- oLogging.CreateEntry “No Profiles.xml file was found, so no additonal DriverProfileSelect pane initialization is required.”, LogTypeInfo
- End If
- End Function
- ‘Function to set the DriverGroup variable
- Function SetDriverProfile
- oEnvironment.Item(“DriverSelectionProfile”) = document.getElementByID(“DriverSelectionProfile”).Value
- End Function
|
Au secours |