feat: Moderniser scripts Winget pour compatibilité MDT USB
- Remplacer chemins en dur par variables dynamiques (\C:\Windows) - Ajouter détection du contexte SYSTEM avec alertes - Implémenter upgrade automatique Winget v7 avant installation - Ajouter gestion d'erreurs robuste et logging détaillé - Ignorer dossier Apps/ dans .gitignore (installers volumineux) - Créer documentation compatibilité MDT USB
This commit is contained in:
+4
-1
@@ -1,2 +1,5 @@
|
||||
"*.tfstate"
|
||||
"*.tfvars"
|
||||
"*.tfvars"
|
||||
# MDT: Ignorer les dossiers Apps (contient les installeurs et manifests locaux)
|
||||
projects/MDT/Scripts/WingetRepo$/Apps/
|
||||
projects/MDT/Scripts/WingetRepo$/Apps/**
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<unattend xmlns="urn:schemas-microsoft-com:unattend">
|
||||
<settings pass="windowsPE">
|
||||
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
|
||||
<ImageInstall>
|
||||
<OSImage>
|
||||
<WillShowUI>OnError</WillShowUI>
|
||||
<InstallTo>
|
||||
<DiskID>0</DiskID>
|
||||
<PartitionID>1</PartitionID>
|
||||
</InstallTo>
|
||||
<InstallFrom>
|
||||
<Path>.\Operating Systems\Microsoft Windows 10 X64 education version 22h2\install.wim</Path>
|
||||
<MetaData>
|
||||
<Key>/IMAGE/INDEX</Key>
|
||||
<Value>1</Value>
|
||||
</MetaData>
|
||||
</InstallFrom>
|
||||
</OSImage>
|
||||
</ImageInstall>
|
||||
<ComplianceCheck>
|
||||
<DisplayReport>OnError</DisplayReport>
|
||||
</ComplianceCheck>
|
||||
<UserData>
|
||||
<AcceptEula>true</AcceptEula>
|
||||
<ProductKey>
|
||||
<Key></Key>
|
||||
</ProductKey>
|
||||
</UserData>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<SetupUILanguage>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
</SetupUILanguage>
|
||||
<InputLocale>0409:00000409</InputLocale>
|
||||
<SystemLocale>en-US</SystemLocale>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="generalize">
|
||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DoNotCleanTaskBar>true</DoNotCleanTaskBar>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="specialize">
|
||||
<component name="Microsoft-Windows-UnattendedJoin" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
|
||||
<Identification>
|
||||
<Credentials>
|
||||
<Username></Username>
|
||||
<Domain></Domain>
|
||||
<Password></Password>
|
||||
</Credentials>
|
||||
<JoinDomain></JoinDomain>
|
||||
<JoinWorkgroup></JoinWorkgroup>
|
||||
<MachineObjectOU></MachineObjectOU>
|
||||
</Identification>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
|
||||
<ComputerName></ComputerName>
|
||||
<ProductKey></ProductKey>
|
||||
<RegisteredOrganization>Service Exploitation - DNE</RegisteredOrganization>
|
||||
<RegisteredOwner>Region Hauts-de-France</RegisteredOwner>
|
||||
<DoNotCleanTaskBar>true</DoNotCleanTaskBar>
|
||||
<TimeZone>Pacific Standard Time</TimeZone>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<Home_Page>about:blank</Home_Page>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-Deployment" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<RunSynchronous>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Description>EnableAdmin</Description>
|
||||
<Order>1</Order>
|
||||
<Path>cmd /c net user Administrator /active:yes</Path>
|
||||
</RunSynchronousCommand>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Description>UnfilterAdministratorToken</Description>
|
||||
<Order>2</Order>
|
||||
<Path>cmd /c reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v FilterAdministratorToken /t REG_DWORD /d 0 /f</Path>
|
||||
</RunSynchronousCommand>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Description>disable user account page</Description>
|
||||
<Order>3</Order>
|
||||
<Path>reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\OOBE /v UnattendCreatedUser /t REG_DWORD /d 1 /f</Path>
|
||||
</RunSynchronousCommand>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Description>disable async RunOnce</Description>
|
||||
<Order>4</Order>
|
||||
<Path>reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer /v AsyncRunOnce /t REG_DWORD /d 0 /f</Path>
|
||||
</RunSynchronousCommand>
|
||||
</RunSynchronous>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<InputLocale>0409:00000409</InputLocale>
|
||||
<SystemLocale>en-US</SystemLocale>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-TapiSetup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<TapiConfigured>0</TapiConfigured>
|
||||
<TapiUnattendLocation>
|
||||
<AreaCode>""</AreaCode>
|
||||
<CountryOrRegion>1</CountryOrRegion>
|
||||
<LongDistanceAccess>9</LongDistanceAccess>
|
||||
<OutsideAccess>9</OutsideAccess>
|
||||
<PulseOrToneDialing>1</PulseOrToneDialing>
|
||||
<DisableCallWaiting>""</DisableCallWaiting>
|
||||
<InternationalCarrierCode>""</InternationalCarrierCode>
|
||||
<LongDistanceCarrierCode>""</LongDistanceCarrierCode>
|
||||
<Name>Default</Name>
|
||||
</TapiUnattendLocation>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-SystemRestore-Main" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DisableSR>1</DisableSR>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="oobeSystem">
|
||||
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
|
||||
<UserAccounts>
|
||||
<AdministratorPassword>
|
||||
<Value></Value>
|
||||
<PlainText>true</PlainText>
|
||||
</AdministratorPassword>
|
||||
</UserAccounts>
|
||||
<AutoLogon>
|
||||
<Enabled>true</Enabled>
|
||||
<Username>Administrator</Username>
|
||||
<Domain>.</Domain>
|
||||
<Password>
|
||||
<Value></Value>
|
||||
<PlainText>true</PlainText>
|
||||
</Password>
|
||||
<LogonCount>999</LogonCount>
|
||||
</AutoLogon>
|
||||
<Display>
|
||||
<ColorDepth></ColorDepth>
|
||||
<HorizontalResolution></HorizontalResolution>
|
||||
<RefreshRate></RefreshRate>
|
||||
<VerticalResolution></VerticalResolution>
|
||||
</Display>
|
||||
<FirstLogonCommands>
|
||||
<SynchronousCommand wcm:action="add">
|
||||
<CommandLine>wscript.exe %SystemDrive%\LTIBootstrap.vbs</CommandLine>
|
||||
<Description>Lite Touch new OS</Description>
|
||||
<Order>1</Order>
|
||||
</SynchronousCommand>
|
||||
</FirstLogonCommands>
|
||||
<OOBE>
|
||||
<HideEULAPage>true</HideEULAPage>
|
||||
<NetworkLocation>Work</NetworkLocation>
|
||||
<ProtectYourPC>1</ProtectYourPC>
|
||||
<HideLocalAccountScreen>true</HideLocalAccountScreen>
|
||||
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
|
||||
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
||||
</OOBE>
|
||||
<RegisteredOrganization>Service Exploitation - DNE</RegisteredOrganization>
|
||||
<RegisteredOwner>Region Hauts-de-France</RegisteredOwner>
|
||||
<TimeZone></TimeZone>
|
||||
</component>
|
||||
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<InputLocale>0409:00000409</InputLocale>
|
||||
<SystemLocale>en-US</SystemLocale>
|
||||
<UILanguage>en-US</UILanguage>
|
||||
<UserLocale>en-US</UserLocale>
|
||||
</component>
|
||||
</settings>
|
||||
<settings pass="offlineServicing">
|
||||
<component name="Microsoft-Windows-PnpCustomizationsNonWinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<DriverPaths>
|
||||
<PathAndCredentials wcm:keyValue="1" wcm:action="add">
|
||||
<Path>\Drivers</Path>
|
||||
</PathAndCredentials>
|
||||
</DriverPaths>
|
||||
</component>
|
||||
</settings>
|
||||
</unattend>
|
||||
@@ -0,0 +1,966 @@
|
||||
<?xml version="1.0"?>
|
||||
<sequence version="3.00" name="Standard Client Task Sequence" description="A complete task sequence for deploying a client operating system">
|
||||
<globalVarList>
|
||||
<variable name="OSGUID" property="OSGUID">{4c947da3-6698-4848-9444-f9bafa9f9d0d}</variable>
|
||||
<variable name="DestinationDisk" property="DestinationDisk">0</variable>
|
||||
<variable name="DestinationPartition" property="DestinationPartition">1</variable>
|
||||
<variable name="DestinationOSVariable" property="DestinationOSVariable">OSDisk</variable>
|
||||
<variable name="DestinationOSRefresh" property="DestinationOSRefresh"></variable>
|
||||
<variable name="DestinationOSDriveLetter" property="DestinationOSDriveLetter"></variable>
|
||||
<variable name="DestinationOSInstallType" property="DestinationOSInstallType">ByVariable</variable>
|
||||
<variable name="OSGUID" property="OSGUID">{4c947da3-6698-4848-9444-f9bafa9f9d0d}</variable>
|
||||
</globalVarList>
|
||||
<group name="Initialization" disable="false" continueOnError="false" description="Initialize the TS environment" expand="false">
|
||||
<step type="BDD_Gather" name="Gather local only" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<defaultVarList>
|
||||
<variable name="GatherLocalOnly" property="GatherLocalOnly">true</variable>
|
||||
<variable name="RulesFile" property="RulesFile"></variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIGather.wsf"</action>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="BGInfo STEP_01 - Start Validation" description="" disable="false" continueOnError="false" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<defaultVarList>
|
||||
<variable name="PackageID" property="PackageID" />
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
<action>"%DEPLOYROOT%\Tools\%ARCHITECTURE%\BGInfo64.exe" "%DEPLOYROOT%\Tools\%ARCHITECTURE%\STEP_01.bgi" /nolicprompt /silent /timer:0</action>
|
||||
</step>
|
||||
</group>
|
||||
<group name="Validation" disable="false" continueOnError="false" description="Test" expand="false">
|
||||
<condition>
|
||||
<operator type="or">
|
||||
<expression type="SMS_TaskSequence_VariableConditionExpression">
|
||||
<variable name="Variable">PHASE</variable>
|
||||
<variable name="Operator">equals</variable>
|
||||
<variable name="Value">VALIDATION</variable>
|
||||
</expression>
|
||||
</operator>
|
||||
</condition>
|
||||
<step type="BDD_Validate" name="Validate" successCodeList="0 3010" description="" startIn="" disable="false" continueOnError="false">
|
||||
<defaultVarList>
|
||||
<variable name="ImageSize" property="ImageSize">0</variable>
|
||||
<variable name="ImageProcessorSpeed" property="ImageProcessorSpeed">800</variable>
|
||||
<variable name="ImageMemory" property="ImageMemory">768</variable>
|
||||
<variable name="VerifyOS" property="VerifyOS">CLIENT</variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIValidate.wsf"</action>
|
||||
</step>
|
||||
<step name="Check BIOS" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIBIOSCheck.wsf"</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<step name="Next Phase" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTINextPhase.wsf"</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
</group>
|
||||
<group name="State Capture" description="" disable="false" continueOnError="false" expand="false">
|
||||
<condition>
|
||||
<expression type="SMS_TaskSequence_VariableConditionExpression">
|
||||
<variable name="Variable">PHASE</variable>
|
||||
<variable name="Operator">equals</variable>
|
||||
<variable name="Value">STATECAPTURE</variable>
|
||||
</expression>
|
||||
</condition>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="Generate Application Migration File" description="" disable="false" continueOnError="false" successCodeList="0 3010" runIn="WinPEandFullOS" startIn="">
|
||||
<defaultVarList>
|
||||
<variable name="PackageID" property="PackageID"></variable>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIAppXmlGen.wsf" /capture</action>
|
||||
</step>
|
||||
<step name="Capture User State" successCodeList="0 3010" description="" startIn="" disable="false" continueOnError="false">
|
||||
<condition>
|
||||
<expression type="SMS_TaskSequence_VariableConditionExpression">
|
||||
<variable name="Variable">USMTOfflineMigration</variable>
|
||||
<variable name="Operator">notEquals</variable>
|
||||
<variable name="Value">TRUE</variable>
|
||||
</expression>
|
||||
</condition>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIUserState.wsf" /capture</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<step name="Capture Groups" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIGroups.wsf" /capture</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<step name="Capture Network Settings" description="" runIn="WinPEandFullOS" successCodeList="0 3010" disable="false" continueOnError="false">
|
||||
<action>cscript.exe "%ScriptRoot%\ZTINicConfig.wsf"</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<group name="Refresh only" disable="false" continueOnError="false" description="" expand="false">
|
||||
<condition>
|
||||
<expression type="SMS_TaskSequence_VariableConditionExpression">
|
||||
<variable name="Variable">DeploymentType</variable>
|
||||
<variable name="Operator">equals</variable>
|
||||
<variable name="Value">REFRESH</variable>
|
||||
</expression>
|
||||
</condition>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="Disable BDE Protectors" description="" disable="false" continueOnError="false" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<defaultVarList>
|
||||
<variable name="PackageID" property="PackageID"></variable>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIDisableBDEProtectors.wsf"</action>
|
||||
</step>
|
||||
<step name="Apply Windows PE" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\LTIApply.wsf" /PE</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
</group>
|
||||
<step name="Next Phase" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTINextPhase.wsf"</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<group name="Refresh only" disable="false" continueOnError="false" expand="false" description="">
|
||||
<condition>
|
||||
<expression type="SMS_TaskSequence_VariableConditionExpression">
|
||||
<variable name="Variable">DeploymentType</variable>
|
||||
<variable name="Operator">equals</variable>
|
||||
<variable name="Value">REFRESH</variable>
|
||||
</expression>
|
||||
</condition>
|
||||
<step type="SMS_TaskSequence_RebootAction" name="Restart computer" description="" disable="false" continueOnError="false" runIn="WinPEandFullOS" successCodeList="0 3010">
|
||||
<defaultVarList>
|
||||
<variable name="Message" property="Message"></variable>
|
||||
<variable name="MessageTimeout" property="MessageTimeout">60</variable>
|
||||
<variable name="Target" property="Target"></variable>
|
||||
</defaultVarList>
|
||||
<action>smsboot.exe /target:WinPE</action>
|
||||
</step>
|
||||
</group>
|
||||
</group>
|
||||
<group name="Preinstall" disable="false" continueOnError="false" description="" expand="false">
|
||||
<condition>
|
||||
<operator type="and" />
|
||||
</condition>
|
||||
<step type="BDD_Gather" name="Gather local only" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<defaultVarList>
|
||||
<variable name="GatherLocalOnly" property="GatherLocalOnly">true</variable>
|
||||
<variable name="RulesFile" property="RulesFile"></variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIGather.wsf"</action>
|
||||
</step>
|
||||
<group name="New Computer only" disable="false" continueOnError="false" description="" expand="false">
|
||||
<condition>
|
||||
<expression type="SMS_TaskSequence_VariableConditionExpression">
|
||||
<variable name="Variable">DeploymentType</variable>
|
||||
<variable name="Operator">equals</variable>
|
||||
<variable name="Value">NEWCOMPUTER</variable>
|
||||
</expression>
|
||||
</condition>
|
||||
<step type="BDD_Validate" name="Validate" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<defaultVarList>
|
||||
<variable name="ImageSize" property="ImageSize">0</variable>
|
||||
<variable name="ImageProcessorSpeed" property="ImageProcessorSpeed">800</variable>
|
||||
<variable name="ImageMemory" property="ImageMemory">768</variable>
|
||||
<variable name="VerifyOS" property="VerifyOS">CLIENT</variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIValidate.wsf"</action>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_PartitionDiskAction" name="Format and Partition Disk (BIOS)" description="" disable="false" continueOnError="false" runIn="WinPEandFullOS" successCodeList="0 3010">
|
||||
<condition>
|
||||
<expression type="SMS_TaskSequence_VariableConditionExpression">
|
||||
<variable name="Operator">notEquals</variable>
|
||||
<variable name="Value">True</variable>
|
||||
<variable name="Variable">IsUEFI</variable>
|
||||
</expression>
|
||||
</condition>
|
||||
<defaultVarList>
|
||||
<variable name="OSDDiskIndex" property="DiskIndex">0</variable>
|
||||
<variable name="OSDDiskPartitions1Type" property="OSDDiskPartitions1Type">Recovery</variable>
|
||||
<variable name="DONotCreateExtraPartition" property="DONotCreateExtraPartition"></variable>
|
||||
<variable name="OSDPartitions0Type" property="Partitions0Type">Primary</variable>
|
||||
<variable name="OSDPartitions0FileSystem" property="Partitions0FileSystem">NTFS</variable>
|
||||
<variable name="OSDPartitions0Bootable" property="Partitions0Bootable">True</variable>
|
||||
<variable name="OSDPartitions0QuickFormat" property="Partitions0QuickFormat">True</variable>
|
||||
<variable name="OSDPartitions0VolumeName" property="Partitions0VolumeName">Windows</variable>
|
||||
<variable name="OSDPartitions0Size" property="Partitions0Size">100</variable>
|
||||
<variable name="OSDPartitions0SizeUnits" property="Partitions0SizeUnits">%</variable>
|
||||
<variable name="OSDPartitions0VolumeLetterVariable" property="Partitions0VolumeLetterVariable">OSDisk</variable>
|
||||
<variable name="OSDPartitions" property="Partitions">1</variable>
|
||||
<variable name="OSDPartitionStyle" property="PartitionStyle">MBR</variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIDiskpart.wsf"</action>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_PartitionDiskAction" name="Format and Partition Disk (UEFI)" description="" runIn="WinPE" successCodeList="0" disable="false" continueOnError="false">
|
||||
<condition>
|
||||
<expression type="SMS_TaskSequence_VariableConditionExpression">
|
||||
<variable name="Operator">equals</variable>
|
||||
<variable name="Value">True</variable>
|
||||
<variable name="Variable">IsUEFI</variable>
|
||||
</expression>
|
||||
</condition>
|
||||
<defaultVarList>
|
||||
<variable name="OSDDiskIndex" property="DiskIndex">0</variable>
|
||||
<variable name="OSDDiskPartitions1Type" property="OSDDiskPartitions1Type">Recovery</variable>
|
||||
<variable name="DONotCreateExtraPartition" property="DONotCreateExtraPartition"></variable>
|
||||
<variable name="OSDPartitions0Type" property="Partitions0Type">EFI</variable>
|
||||
<variable name="OSDPartitions0FileSystem" property="Partitions0FileSystem">FAT32</variable>
|
||||
<variable name="OSDPartitions0Bootable" property="Partitions0Bootable">True</variable>
|
||||
<variable name="OSDPartitions0QuickFormat" property="Partitions0QuickFormat">True</variable>
|
||||
<variable name="OSDPartitions0VolumeName" property="Partitions0VolumeName">Boot</variable>
|
||||
<variable name="OSDPartitions0Size" property="Partitions0Size">499</variable>
|
||||
<variable name="OSDPartitions0SizeUnits" property="Partitions0SizeUnits">MB</variable>
|
||||
<variable name="OSDPartitions0VolumeLetterVariable" property="Partitions0VolumeLetterVariable"></variable>
|
||||
<variable name="OSDPartitions1Type" property="Partitions1Type">MSR</variable>
|
||||
<variable name="OSDPartitions1FileSystem" property="Partitions1FileSystem">NTFS</variable>
|
||||
<variable name="OSDPartitions1Bootable" property="Partitions1Bootable">False</variable>
|
||||
<variable name="OSDPartitions1QuickFormat" property="Partitions1QuickFormat">True</variable>
|
||||
<variable name="OSDPartitions1VolumeName" property="Partitions1VolumeName"></variable>
|
||||
<variable name="OSDPartitions1Size" property="Partitions1Size">128</variable>
|
||||
<variable name="OSDPartitions1SizeUnits" property="Partitions1SizeUnits">MB</variable>
|
||||
<variable name="OSDPartitions1VolumeLetterVariable" property="Partitions1VolumeLetterVariable"></variable>
|
||||
<variable name="OSDPartitions2Type" property="Partitions2Type">Primary</variable>
|
||||
<variable name="OSDPartitions2FileSystem" property="Partitions2FileSystem">NTFS</variable>
|
||||
<variable name="OSDPartitions2Bootable" property="Partitions2Bootable">False</variable>
|
||||
<variable name="OSDPartitions2QuickFormat" property="Partitions2QuickFormat">True</variable>
|
||||
<variable name="OSDPartitions2VolumeName" property="Partitions2VolumeName">Windows</variable>
|
||||
<variable name="OSDPartitions2Size" property="Partitions2Size">100</variable>
|
||||
<variable name="OSDPartitions2SizeUnits" property="Partitions2SizeUnits">%</variable>
|
||||
<variable name="OSDPartitions2VolumeLetterVariable" property="Partitions2VolumeLetterVariable">OSDisk</variable>
|
||||
<variable name="OSDPartitions" property="Partitions">3</variable>
|
||||
<variable name="OSDPartitionStyle" property="PartitionStyle">GPT</variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIDiskpart.wsf"</action>
|
||||
</step>
|
||||
<step name="Copy scripts" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\LTICopyScripts.wsf"</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
</group>
|
||||
<group name="Offline User State Capture" disable="false" continueOnError="false" description="" expand="false">
|
||||
<condition>
|
||||
<expression type="SMS_TaskSequence_VariableConditionExpression">
|
||||
<variable name="Variable">USMTOfflineMigration</variable>
|
||||
<variable name="Operator">Equals</variable>
|
||||
<variable name="Value">TRUE</variable>
|
||||
</expression>
|
||||
</condition>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="Offline User State Capture" description="" disable="false" continueOnError="false" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIUserState.wsf" /capture</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="Unload USMT Hive" description="" disable="false" continueOnError="true" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<action>cmd /c REG UNLOAD HKLM\$DEST$SOFTWARE</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
</group>
|
||||
<group name="Refresh only" disable="false" continueOnError="false" description="" expand="false">
|
||||
<condition>
|
||||
<expression type="SMS_TaskSequence_VariableConditionExpression">
|
||||
<variable name="Variable">DeploymentType</variable>
|
||||
<variable name="Operator">equals</variable>
|
||||
<variable name="Value">REFRESH</variable>
|
||||
</expression>
|
||||
</condition>
|
||||
<step name="Backup" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIBackup.wsf"</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
</group>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="BGInfo STEP_03 - Installing Drivers" description="" disable="false" continueOnError="false" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<defaultVarList>
|
||||
<variable name="PackageID" property="PackageID" />
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
<action>"%DEPLOYROOT%\Tools\%ARCHITECTURE%\BGInfo64.exe" "%DEPLOYROOT%\Tools\%ARCHITECTURE%\STEP_03.bgi" /nolicprompt /silent /timer:0</action>
|
||||
</step>
|
||||
<step name="Configure" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIConfigure.wsf"</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="Enable BitLocker (Offline)" description="" disable="false" continueOnError="true" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIBDE.wsf"</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_SetVariableAction" name="Set Drivergroup" description="" disable="false" continueOnError="false" successCodeList="0 3010">
|
||||
<defaultVarList>
|
||||
<variable name="VariableName" property="VariableName">DriverGroup001</variable>
|
||||
<variable name="VariableValue" property="VariableValue">Windows 11 x64\%make%\%model%</variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTISetVariable.wsf"</action>
|
||||
</step>
|
||||
<step type="BDD_InjectDrivers" name="Inject Drivers" description="" disable="false" continueOnError="false" runIn="WinPEandFullOS" successCodeList="0 3010">
|
||||
<defaultVarList>
|
||||
<variable name="DriverSelectionProfile" property="DriverSelectionProfile">Nothing</variable>
|
||||
<variable name="DriverInjectionMode" property="DriverInjectionMode">ALL</variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIDrivers.wsf"</action>
|
||||
</step>
|
||||
<step type="BDD_InstallUpdatesOffline" name="Apply Patches" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIPatches.wsf"</action>
|
||||
<defaultVarList>
|
||||
<variable name="PackageSelectionProfile" property="PackageSelectionProfile">All Packages</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<step name="Next Phase" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTINextPhase.wsf"</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
</group>
|
||||
<group name="Install" disable="false" continueOnError="false" description="" expand="false">
|
||||
<condition>
|
||||
<expression type="SMS_TaskSequence_VariableConditionExpression">
|
||||
<variable name="Variable">PHASE</variable>
|
||||
<variable name="Operator">equals</variable>
|
||||
<variable name="Value">INSTALL</variable>
|
||||
</expression>
|
||||
</condition>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="BGInfo STEP_04 - Installing Windows" description="" disable="false" continueOnError="false" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<defaultVarList>
|
||||
<variable name="PackageID" property="PackageID" />
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
<action>"%DEPLOYROOT%\Tools\%ARCHITECTURE%\BGInfo64.exe" "%DEPLOYROOT%\Tools\%ARCHITECTURE%\STEP_04.bgi" /nolicprompt /silent /timer:0</action>
|
||||
</step>
|
||||
<step type="BDD_InstallOS" name="Install Operating System" description="" disable="false" continueOnError="false" runIn="WinPEandFullOS" successCodeList="0 3010">
|
||||
<defaultVarList>
|
||||
<variable name="OSGUID" property="OSGUID">{4c947da3-6698-4848-9444-f9bafa9f9d0d}</variable>
|
||||
<variable name="DestinationDisk" property="DestinationDisk">0</variable>
|
||||
<variable name="DestinationPartition" property="DestinationPartition">1</variable>
|
||||
<variable name="DestinationOSDriveLetter" property="DestinationOSDriveLetter"></variable>
|
||||
<variable name="DestinationOSVariable" property="DestinationOSVariable">OSDisk</variable>
|
||||
<variable name="DestinationOSRefresh" property="DestinationOSRefresh"></variable>
|
||||
<variable name="DestinationOSInstallType" property="DestinationOSInstallType">ByVariable</variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\LTIApply.wsf"</action>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="CopyOEM files" description="" disable="false" continueOnError="false" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<defaultVarList>
|
||||
<variable name="PackageID" property="PackageID" />
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\CopyOEM.wsf"</action>
|
||||
</step>
|
||||
<step name="Next Phase" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTINextPhase.wsf"</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
</group>
|
||||
<group name="Postinstall" disable="false" continueOnError="false" description="" expand="false">
|
||||
<condition>
|
||||
<expression type="SMS_TaskSequence_VariableConditionExpression">
|
||||
<variable name="Variable">PHASE</variable>
|
||||
<variable name="Operator">equals</variable>
|
||||
<variable name="Value">POSTINSTALL</variable>
|
||||
</expression>
|
||||
</condition>
|
||||
<step name="Copy Scripts" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\LTICopyScripts.wsf"</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<step name="Configure" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIConfigure.wsf"</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<step name="Inject Drivers" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIdrivers.wsf"</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<step type="BDD_InstallUpdatesOffline" name="Apply Patches" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIPatches.wsf"</action>
|
||||
<defaultVarList>
|
||||
<variable name="PackageSelectionProfile" property="PackageSelectionProfile">All Packages</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="Add Windows Recovery (WinRE)" description="" disable="false" continueOnError="false" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIWinRE.wsf"</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<step name="Next Phase" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTINextPhase.wsf"</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<group expand="false" name="Settings Only Bios Change Lenovo" description="" disable="true" continueOnError="true">
|
||||
<action />
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="Set Secure Boot and PXE (ThinkCentre)" description="" disable="false" continueOnError="false" startIn="%ScriptRoot%\BiosConfig\Lenovo\" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<defaultVarList>
|
||||
<variable name="PackageID" property="PackageID" />
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
<action>cmd /c %ScriptRoot%\BiosConfig\Lenovo\ThinkBiosConfig.hta "file=ThinkCentreSecBootPXE.ini"</action>
|
||||
<condition>
|
||||
<expression type="SMS_TaskSequence_WMIConditionExpression">
|
||||
<variable name="Namespace">root\cimv2</variable>
|
||||
<variable name="Query">SELECT * FROM Win32_ComputerSystemProduct WHERE Version LIKE 'ThinkCentre%'</variable>
|
||||
</expression>
|
||||
</condition>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="Set Secure Boot and PXE (ThinkPad)" description="" disable="false" continueOnError="false" startIn="%ScriptRoot%\BiosConfig\Lenovo\" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<defaultVarList>
|
||||
<variable name="PackageID" property="PackageID"></variable>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
<action>cmd /c %ScriptRoot%\BiosConfig\Lenovo\ThinkBiosConfig.hta "file=ThinkPadSecBootPXE.ini"</action>
|
||||
<condition>
|
||||
<expression type="SMS_TaskSequence_WMIConditionExpression">
|
||||
<variable name="Namespace">root\cimv2</variable>
|
||||
<variable name="Query">SELECT * FROM Win32_ComputerSystemProduct WHERE Version LIKE 'ThinkPad%'</variable>
|
||||
</expression>
|
||||
</condition>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="Clean Boot Drive" description="" disable="false" continueOnError="false" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<defaultVarList>
|
||||
<variable name="PackageID" property="PackageID"></variable>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
<action>diskpart /s %ScriptRoot%\BIOSConfig\CleanBootDrive.txt</action>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="Reboot from WinPE" description="" disable="true" continueOnError="false" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<defaultVarList>
|
||||
<variable name="PackageID" property="PackageID"></variable>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
<action>Wpeutil Reboot</action>
|
||||
</step>
|
||||
<condition>
|
||||
<operator type="or">
|
||||
<expression type="SMS_TaskSequence_WMIConditionExpression">
|
||||
<variable name="Namespace">root\wmi</variable>
|
||||
<variable name="Query">SELECT * FROM Lenovo_BiosSetting WHERE CurrentSetting Like 'Secure Boot,Disable%'</variable>
|
||||
</expression>
|
||||
<expression type="SMS_TaskSequence_WMIConditionExpression">
|
||||
<variable name="Namespace">root\wmi</variable>
|
||||
<variable name="Query">SELECT * FROM Lenovo_BiosSetting WHERE CurrentSetting Like 'SecureBoot,Disable%'</variable>
|
||||
</expression>
|
||||
<expression type="SMS_TaskSequence_WMIConditionExpression">
|
||||
<variable name="Namespace">root\wmi</variable>
|
||||
<variable name="Query">SELECT * FROM Lenovo_BiosSetting WHERE CurrentSetting Like 'Secure boot,Disable%'</variable>
|
||||
</expression>
|
||||
</operator>
|
||||
</condition>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="Set Boot Order to Hard Drive (ThinkPad)" description="" disable="false" continueOnError="false" startIn="%ScriptRoot%\BiosConfig\Lenovo" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<defaultVarList>
|
||||
<variable name="PackageID" property="PackageID"></variable>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
<action>cmd /c %ScriptRoot%\BiosConfig\Lenovo\ThinkBiosConfig.hta "file=ThinkPadHDD.ini"</action>
|
||||
<condition>
|
||||
<expression type="SMS_TaskSequence_WMIConditionExpression">
|
||||
<variable name="Namespace">root\cimv2</variable>
|
||||
<variable name="Query">SELECT * FROM Win32_ComputerSystemProduct WHERE Version LIKE 'ThinkPad%'</variable>
|
||||
</expression>
|
||||
</condition>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="Set Primary Boot Sequence to Hard Drive (ThinkCentre)" description="" disable="false" continueOnError="false" startIn="%ScriptRoot%\BiosConfig\Lenovo" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<defaultVarList>
|
||||
<variable name="PackageID" property="PackageID"></variable>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
<action>cmd /c %ScriptRoot%\BiosConfig\Lenovo\ThinkBiosConfig.hta "file=ThinkCentreHDD.ini"</action>
|
||||
<condition>
|
||||
<expression type="SMS_TaskSequence_WMIConditionExpression">
|
||||
<variable name="Namespace">root\cimv2</variable>
|
||||
<variable name="Query">SELECT * FROM Win32_ComputerSystemProduct WHERE Version LIKE 'ThinkCentre%'</variable>
|
||||
</expression>
|
||||
</condition>
|
||||
</step>
|
||||
</group>
|
||||
<step type="SMS_TaskSequence_SetVariableAction" name="BIOSPassword Initialisation" description="" disable="true" continueOnError="false" successCodeList="0 3010">
|
||||
<defaultVarList>
|
||||
<variable name="VariableName" property="VariableName">BIOSPassword</variable>
|
||||
<variable name="VariableValue" property="VariableValue">crhdf</variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTISetVariable.wsf"</action>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="Retrieve BIOS password securely" description="Load BIOS password from secure source and assign MDT variable" disable="true" continueOnError="false" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<defaultVarList>
|
||||
<variable name="PackageID" property="PackageID"></variable>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\SupportHDF\Set_BIOSPassword_FromDatabase.vbs"</action>
|
||||
<condition>
|
||||
<expression type="SMS_TaskSequence_WMIConditionExpression">
|
||||
<variable name="Namespace">root\cimv2</variable>
|
||||
<variable name="Query">SELECT * FROM Win32_ComputerSystemProduct WHERE Name LIKE '%ThinkCentre%' OR Name LIKE '%neo 50s%'</variable>
|
||||
</expression>
|
||||
</condition>
|
||||
</step>
|
||||
<group expand="false" name="Configure BIOS Lenovo Full Settings" description="Apply complete BIOS settings for Lenovo ThinkCentre neo 50s" disable="true" continueOnError="true">
|
||||
<action />
|
||||
<step type="BDD_RunPowerShellAction" name="Configure BIOS Lenovo Full Settings" description="" disable="false" continueOnError="true" successCodeList="0 3010">
|
||||
<defaultVarList>
|
||||
<variable name="ScriptName" property="ScriptName">%SCRIPTROOT%\SupportHDF\ps1\ConfigureBIOSLenovo_TSIntegration.ps1</variable>
|
||||
<variable name="Parameters" property="Parameters">-path %SCRIPTROOT%\SupportHDF\ps1 -Bypass</variable>
|
||||
<variable name="PackageID" property="PackageID"></variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIPowerShell.wsf</action>
|
||||
<condition>
|
||||
<expression type="SMS_TaskSequence_WMIConditionExpression">
|
||||
<variable name="Namespace">root\cimv2</variable>
|
||||
<variable name="Query">SELECT * FROM Win32_ComputerSystemProduct WHERE Name LIKE '%ThinkCentre%' OR Name LIKE '%neo 50s%'</variable>
|
||||
</expression>
|
||||
</condition>
|
||||
</step>
|
||||
</group>
|
||||
<step type="SMS_TaskSequence_RebootAction" name="Restart computer" description="" disable="false" continueOnError="false" runIn="WinPEandFullOS" successCodeList="0 3010">
|
||||
<defaultVarList>
|
||||
<variable name="Message" property="Message"></variable>
|
||||
<variable name="MessageTimeout" property="MessageTimeout">60</variable>
|
||||
<variable name="Target" property="Target"></variable>
|
||||
</defaultVarList>
|
||||
<action>smsboot.exe /target:WinPE</action>
|
||||
</step>
|
||||
</group>
|
||||
<group name="State Restore" disable="false" continueOnError="false" description="" expand="true">
|
||||
<condition>
|
||||
<expression type="SMS_TaskSequence_VariableConditionExpression">
|
||||
<variable name="Variable">PHASE</variable>
|
||||
<variable name="Operator">equals</variable>
|
||||
<variable name="Value">STATERESTORE</variable>
|
||||
</expression>
|
||||
</condition>
|
||||
<step type="BDD_Gather" name="Gather local only" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<defaultVarList>
|
||||
<variable name="GatherLocalOnly" property="GatherLocalOnly">true</variable>
|
||||
<variable name="RulesFile" property="RulesFile"></variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIGather.wsf"</action>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_SetVariableAction" name="OSDAdapter0Name" description="LAN_Peda" disable="true" continueOnError="true" successCodeList="0 3010">
|
||||
<defaultVarList>
|
||||
<variable name="VariableName" property="VariableName">OSDAdapter0Name</variable>
|
||||
<variable name="VariableValue" property="VariableValue">LAN_Peda</variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTISetVariable.wsf"</action>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_SetVariableAction" name="OSDAdapter1Name" description="LAN_Peda" disable="true" continueOnError="true" successCodeList="0 3010">
|
||||
<defaultVarList>
|
||||
<variable name="VariableName" property="VariableName">OSDAdapter1Name</variable>
|
||||
<variable name="VariableValue" property="VariableValue">LAN_Peda</variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTISetVariable.wsf"</action>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_ApplyNetworkSettingsAction" name="New Name NIC" description="" disable="false" continueOnError="true" runIn="WinPEandFullOS" successCodeList="0 3010">
|
||||
<defaultVarList>
|
||||
<variable name="OSDAdapterCount" property="NumAdapters">1</variable>
|
||||
<variable name="OSDAdapter0DNSServerList" property="Adapters0DNSServerList"></variable>
|
||||
<variable name="OSDAdapter0EnableDHCP" property="Adapters0EnableDHCP">True</variable>
|
||||
<variable name="OSDAdapter0EnableDNSRegistration" property="Adapters0EnableDNSRegistration">False</variable>
|
||||
<variable name="OSDAdapter0EnableFullDNSRegistration" property="Adapters0EnableFullDNSRegistration">True</variable>
|
||||
<variable name="OSDAdapter0EnableTCPIPFiltering" property="Adapters0EnableTCPIPFiltering">False</variable>
|
||||
<variable name="OSDAdapter0EnableLMHOSTS" property="Adapters0EnableLMHOSTS">False</variable>
|
||||
<variable name="OSDAdapter0EnableWINS" property="Adapters0EnableWINS">False</variable>
|
||||
<variable name="OSDAdapter0GatewayCostMetric" property="Adapters0GatewayCostMetric"></variable>
|
||||
<variable name="OSDAdapter0Gateways" property="Adapters0Gateways"></variable>
|
||||
<variable name="OSDAdapter0IPAddressList" property="Adapters0IPAddressList"></variable>
|
||||
<variable name="OSDAdapter0Name" property="Adapters0Name">LAN_Peda</variable>
|
||||
<variable name="OSDAdapter0MacAddress" property="Adapters0MacAddress"></variable>
|
||||
<variable name="OSDAdapter0SubnetMask" property="Adapters0SubnetMask"></variable>
|
||||
<variable name="OSDAdapter0DNSSuffix" property="Adapters0DNSSuffix"></variable>
|
||||
<variable name="OSDAdapter0TcpipNetbiosOptions" property="Adapters0TcpipNetbiosOptions">0</variable>
|
||||
<variable name="OSDAdapter0WINSServerList" property="Adapters0WINSServerList"></variable>
|
||||
<variable name="OSDAdapter0TCPFilterPortList" property="Adapters0TCPFilterPortList"></variable>
|
||||
<variable name="OSDAdapter0UDPFilterPortList" property="Adapters0UDPFilterPortList"></variable>
|
||||
<variable name="OSDAdapter0IPProtocolFilterList" property="Adapters0IPProtocolFilterList"></variable>
|
||||
<variable name="OSDAdapter" property="Adapters">1</variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTINICConfig.wsf"</action>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="UAC Off" description="" disable="false" continueOnError="false" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<defaultVarList>
|
||||
<variable name="PackageID" property="PackageID" />
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
<action>regedit /s %SCRIPTROOT%\SupportHDF\reg\uacoff.reg</action>
|
||||
</step>
|
||||
<step type="BDD_RunPowerShellAction" name="Power Config" description="" disable="false" continueOnError="false" successCodeList="0 3010">
|
||||
<defaultVarList>
|
||||
<variable name="ScriptName" property="ScriptName">%SCRIPTROOT%\SupportHDF\ps1\powercfg.ps1</variable>
|
||||
<variable name="Parameters" property="Parameters">-path %SCRIPTROOT%\SupportHDF\ps1\</variable>
|
||||
<variable name="PackageID" property="PackageID" />
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIPowerShell.wsf</action>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="Activation VerrNum" description="" disable="false" continueOnError="false" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<defaultVarList>
|
||||
<variable name="PackageID" property="PackageID" />
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
<action>regedit /s %SCRIPTROOT%\SupportHDF\reg\EnableVerrNum.reg</action>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="Centre-d'intéret Off" description="" disable="false" continueOnError="true" startIn="" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<defaultVarList>
|
||||
<variable name="PackageID" property="PackageID" />
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
<action>regedit /s %SCRIPTROOT%\SupportHDF\reg\Disable_News_and_Interests_on_taskbar_feature_for_all_users.reg</action>
|
||||
</step>
|
||||
<step name="Post-Apply Cleanup" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\LTIApply.wsf" /post</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<group expand="true" name="Dell Pro Slim QSC1250" description="Collège Baudelaire Dotation Mai 2026" disable="false" continueOnError="false">
|
||||
<action />
|
||||
<condition>
|
||||
<operator type="and">
|
||||
<expression type="SMS_TaskSequence_VariableConditionExpression">
|
||||
<variable name="Variable">%model%</variable>
|
||||
<variable name="Operator">equals</variable>
|
||||
<variable name="Value">Dell Pro Slim QSC1250</variable>
|
||||
</expression>
|
||||
</operator>
|
||||
</condition>
|
||||
<step type="BDD_RunPowerShellAction" name="Install Dell Command Update" description="" disable="false" continueOnError="true" successCodeList="0 3010">
|
||||
<defaultVarList>
|
||||
<variable name="ScriptName" property="ScriptName">%SCRIPTROOT%\SupportHDF\ps1\install_choco_dellcommandupdate.ps1</variable>
|
||||
<variable name="Parameters" property="Parameters">-path %SCRIPTROOT%\SupportHDF\ps1\</variable>
|
||||
<variable name="PackageID" property="PackageID" />
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIPowerShell.wsf</action>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="DCU /scan" description="On scan les péripériques avant de mettre à jour" disable="false" continueOnError="false" startIn="%ProgramFiles(x86)%\Dell\CommandUpdate\" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<defaultVarList>
|
||||
<variable name="PackageID" property="PackageID"></variable>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
<action>%ProgramFiles(x86)%\Dell\CommandUpdate\dcu-cli.exe /scan</action>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="DCU /applyUpdates" description="On installe les drivers" disable="false" continueOnError="false" startIn="%ProgramFiles(x86)%\Dell\CommandUpdate\" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<defaultVarList>
|
||||
<variable name="PackageID" property="PackageID" />
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
<action>%ProgramFiles(x86)%\Dell\CommandUpdate\dcu-cli.exe /applyUpdates -reboot=disable -autoSuspendBitLocker=enable</action>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_RebootAction" name="Restart computer" description="" disable="false" continueOnError="false" runIn="WinPEandFullOS" successCodeList="0 3010">
|
||||
<defaultVarList>
|
||||
<variable name="SMSRebootMessage" property="Message"></variable>
|
||||
<variable name="SMSRebootTimeout" property="MessageTimeout">60</variable>
|
||||
<variable name="SMSRebootTarget" property="Target"></variable>
|
||||
</defaultVarList>
|
||||
<action>smsboot.exe /target:WinPE</action>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="DCU /scan" description="On scan à nouveau" disable="false" continueOnError="false" startIn="%ProgramFiles(x86)%\Dell\CommandUpdate\" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<defaultVarList>
|
||||
<variable name="PackageID" property="PackageID" />
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
<action>%ProgramFiles(x86)%\Dell\CommandUpdate\dcu-cli.exe /scan</action>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_RunCommandLineAction" name="DCU /applyUpdates" description="On installe les derniers drivers disponibles" disable="false" continueOnError="false" startIn="%ProgramFiles(x86)%\Dell\CommandUpdate\" successCodeList="0 3010" runIn="WinPEandFullOS">
|
||||
<defaultVarList>
|
||||
<variable name="PackageID" property="PackageID" />
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
<action>%ProgramFiles(x86)%\Dell\CommandUpdate\dcu-cli.exe /applyUpdates</action>
|
||||
</step>
|
||||
</group>
|
||||
<step type="BDD_RecoverDomainJoin" name="Recover From Domain " description="" disable="true" continueOnError="false" runIn="WinPEandFullOS" successCodeList="0 3010">
|
||||
<defaultVarList>
|
||||
<variable name="DomainErrorRecovery" property="DomainErrorRecovery">Auto</variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIDomainJoin.wsf" </action>
|
||||
</step>
|
||||
<step name="Tattoo" disable="false" continueOnError="true" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTITatoo.wsf"</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<step name="Opt In to CEIP and WER" disable="true" continueOnError="true" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIOptIn.wsf" /CEIP:YES /WER:YES</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<step name="Windows Update (Pre-Application Installation)" disable="true" continueOnError="true" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIWindowsUpdate.wsf"</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<step type="BDD_InstallApplication" name="Install Applications" disable="true" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIApplications.wsf"</action>
|
||||
<defaultVarList>
|
||||
<variable name="ApplicationGUID" property="ApplicationGUID"></variable>
|
||||
<variable name="ApplicationSuccessCodes" property="ApplicationSuccessCodes">0 3010</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<step type="BDD_RunPowerShellAction" name="Install Winget + Logiciels de base" description="7-Zip 26.01
Audacity 3.7.7
Google Chrome 149.0.7827.54
LibreOffice 26.2.3.2
Microsoft Edge 148.0.3967.96
Notepad++ 8.9.6.4
Python 3.14.5
SumatraPDF 3.6.1
VLC media player 3.0.23
Xmind 26.3.4129
Dépendances présentes
Microsoft Visual C++ 2015-2022 Redistributable (x64) 14.51.36231.0" disable="false" continueOnError="true" successCodeList="0 3010">
|
||||
<defaultVarList>
|
||||
<variable name="ScriptName" property="ScriptName">%SCRIPTROOT%\SupportHDF\ps1\Prepare-Winget.ps1</variable>
|
||||
<variable name="Parameters" property="Parameters">-path %SCRIPTROOT%\SupportHDF\ps1\</variable>
|
||||
<variable name="PackageID" property="PackageID"></variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIPowerShell.wsf</action>
|
||||
</step>
|
||||
<step type="BDD_RunPowerShellAction" name="Install Choco + Bureautique" description="" disable="true" continueOnError="true" successCodeList="0 3010">
|
||||
<defaultVarList>
|
||||
<variable name="ScriptName" property="ScriptName">%SCRIPTROOT%\SupportHDF\ps1\install_choco_bureautique.ps1</variable>
|
||||
<variable name="Parameters" property="Parameters">-path %SCRIPTROOT%\SupportHDF\ps1\</variable>
|
||||
<variable name="PackageID" property="PackageID" />
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIPowerShell.wsf</action>
|
||||
</step>
|
||||
<step type="BDD_RunPowerShellAction" name="Lenovo Bios Settings All PS1" description="Secure Boot Enabled" disable="false" continueOnError="true" successCodeList="0 3010">
|
||||
<defaultVarList>
|
||||
<variable name="ScriptName" property="ScriptName">%SCRIPTROOT%\SupportHDF\ps1\ConfigBiosLenovo.ps1</variable>
|
||||
<variable name="Parameters" property="Parameters">-path %SCRIPTROOT%\SupportHDF\ps1\</variable>
|
||||
<variable name="PackageID" property="PackageID" />
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIPowerShell.wsf</action>
|
||||
</step>
|
||||
<step type="SMS_TaskSequence_RebootAction" name="Restart computer" description="" disable="false" continueOnError="false" runIn="WinPEandFullOS" successCodeList="0 3010">
|
||||
<defaultVarList>
|
||||
<variable name="SMSRebootMessage" property="Message"></variable>
|
||||
<variable name="SMSRebootTimeout" property="MessageTimeout">60</variable>
|
||||
<variable name="SMSRebootTarget" property="Target"></variable>
|
||||
</defaultVarList>
|
||||
<action>smsboot.exe /target:WinPE</action>
|
||||
</step>
|
||||
<step type="BDD_RunPowerShellAction" name="Create Local User" description="" disable="false" continueOnError="true" successCodeList="0 3010">
|
||||
<defaultVarList>
|
||||
<variable name="ScriptName" property="ScriptName">%SCRIPTROOT%\Users\LocalUsers.ps1</variable>
|
||||
<variable name="Parameters" property="Parameters">-path %SCRIPTROOT%\</variable>
|
||||
<variable name="PackageID" property="PackageID" />
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIPowerShell.wsf</action>
|
||||
</step>
|
||||
<step name="Windows Update (Post-Application Installation)" disable="false" continueOnError="true" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIWindowsUpdate.wsf"</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<group name="Domain EDU.HDF" disable="false" continueOnError="false" expand="true" description="">
|
||||
<step type="BDD_RunPowerShellAction" name="Join Domain EDU.HDF" description="" disable="false" continueOnError="false" successCodeList="0 3010">
|
||||
<defaultVarList>
|
||||
<variable name="ScriptName" property="ScriptName">%SCRIPTROOT%\SupportHDF\ps1\Join-Domain.ps1</variable>
|
||||
<variable name="Parameters" property="Parameters">-path %SCRIPTROOT%\SupportHDF\ps1\</variable>
|
||||
<variable name="PackageID" property="PackageID"></variable>
|
||||
</defaultVarList>
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIPowerShell.wsf</action>
|
||||
</step>
|
||||
</group>
|
||||
<step type="SMS_TaskSequence_EnableBitLockerAction" name="Enable BitLocker" continueOnError="true" successCodeList="0 3010" description="" startIn="" disable="false">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIBde.wsf"</action>
|
||||
<condition>
|
||||
<expression type="SMS_TaskSequence_VariableConditionExpression">
|
||||
<variable name="Variable">BdeInstallSuppress</variable>
|
||||
<variable name="Operator">notEquals</variable>
|
||||
<variable name="Value">YES</variable>
|
||||
</expression>
|
||||
</condition>
|
||||
<defaultVarList>
|
||||
<variable name="OSDBitLockerTargetDrive" property="BdeTargetDriveLetter"></variable>
|
||||
<variable name="OSDBitLockerMode" property="BdeInstall">TPM</variable>
|
||||
<variable name="OSDBitLockerStartupKeyDrive" property="BdeKeyLocation"></variable>
|
||||
<variable name="OSDBitLockerCreateRecoveryPassword" property="BdeRecoveryPassword">AD</variable>
|
||||
<variable name="OSDBitLockerWaitForEncryption" property="WaitForEncryption">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<step name="Restore User State" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIUserState.wsf" /restore</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<step name="Restore Groups" disable="false" continueOnError="false" successCodeList="0 3010" description="" startIn="">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIGroups.wsf" /restore</action>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
<step name="Apply Local GPO Package" description="" disable="false" continueOnError="false" startIn="" successCodeList="0 3010">
|
||||
<action>cscript.exe "%SCRIPTROOT%\ZTIApplyGPOPack.wsf"</action>
|
||||
<condition>
|
||||
<expression type="SMS_TaskSequence_VariableConditionExpression">
|
||||
<variable name="Variable">ApplyGPOPack</variable>
|
||||
<variable name="Operator">notEquals</variable>
|
||||
<variable name="Value">NO</variable>
|
||||
</expression>
|
||||
</condition>
|
||||
<defaultVarList>
|
||||
<variable name="RunAsUser" property="RunAsUser">false</variable>
|
||||
<variable name="SMSTSRunCommandLineUserName" property="SMSTSRunCommandLineUserName"></variable>
|
||||
<variable name="SMSTSRunCommandLineUserPassword" property="SMSTSRunCommandLineUserPassword"></variable>
|
||||
<variable name="LoadProfile" property="LoadProfile">false</variable>
|
||||
</defaultVarList>
|
||||
</step>
|
||||
</group>
|
||||
</sequence>
|
||||
@@ -0,0 +1,249 @@
|
||||
<#
|
||||
Script PowerShell - Installation Chocolatey avec cache local
|
||||
Optimisé pour MDT USB / Windows 11 25H2
|
||||
Utilise un dossier local 'softwares' pour accélérer l'installation
|
||||
Fallback automatique vers Internet si package absent
|
||||
Gestion timeout + retry + logs
|
||||
#>
|
||||
|
||||
#region CONFIGURATION
|
||||
|
||||
$LogFile = "C:\Windows\Temp\choco_install.log"
|
||||
|
||||
$GlobalTimeoutMinutes = 180
|
||||
$PackageTimeoutSeconds = 2700
|
||||
$RetryCount = 2
|
||||
|
||||
# Dossier local contenant les packages .nupkg
|
||||
$LocalRepo = Join-Path $PSScriptRoot "softwares"
|
||||
|
||||
$Packages = @(
|
||||
"chocolatey-core.extension",
|
||||
"chocolatey-compatibility.extension",
|
||||
"chocolatey-windowsupdate.extension",
|
||||
"vcredist140",
|
||||
|
||||
"dellcommandupdate"
|
||||
)
|
||||
|
||||
#endregion
|
||||
|
||||
#region LOGGING
|
||||
|
||||
function Write-Log {
|
||||
|
||||
param ([string]$Message)
|
||||
|
||||
$Time = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
|
||||
|
||||
$Entry = "$Time - $Message"
|
||||
|
||||
Write-Output $Entry
|
||||
|
||||
try {
|
||||
Add-Content $LogFile $Entry
|
||||
}
|
||||
catch {}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GLOBAL TIMER
|
||||
|
||||
$ScriptStartTime = Get-Date
|
||||
|
||||
function Test-GlobalTimeout {
|
||||
|
||||
$Elapsed = (Get-Date) - $ScriptStartTime
|
||||
|
||||
if ($Elapsed.TotalMinutes -gt $GlobalTimeoutMinutes) {
|
||||
|
||||
Write-Log "GLOBAL TIMEOUT atteint"
|
||||
|
||||
exit 1
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PREREQUIS
|
||||
|
||||
Write-Log "Verification prerequis"
|
||||
|
||||
Set-ExecutionPolicy Bypass -Scope Process -Force
|
||||
|
||||
[System.Net.ServicePointManager]::SecurityProtocol =
|
||||
[System.Net.ServicePointManager]::SecurityProtocol -bor 3072
|
||||
|
||||
#endregion
|
||||
|
||||
#region INSTALL CHOCOLATEY
|
||||
|
||||
if (!(Get-Command choco -ErrorAction SilentlyContinue)) {
|
||||
|
||||
Write-Log "Installation Chocolatey"
|
||||
|
||||
Invoke-Expression (
|
||||
(New-Object System.Net.WebClient).DownloadString(
|
||||
"https://community.chocolatey.org/install.ps1"
|
||||
)
|
||||
)
|
||||
|
||||
refreshenv
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
Write-Log "Chocolatey deja installe"
|
||||
|
||||
}
|
||||
|
||||
choco feature enable -n allowGlobalConfirmation
|
||||
|
||||
#endregion
|
||||
|
||||
#region LOCAL REPO CHECK
|
||||
|
||||
if (!(Test-Path $LocalRepo)) {
|
||||
Write-Log "Creation depot local : $LocalRepo"
|
||||
New-Item -ItemType Directory -Path $LocalRepo -Force
|
||||
}
|
||||
|
||||
Write-Log "Depot local : $LocalRepo"
|
||||
|
||||
#endregion
|
||||
|
||||
#region DOWNLOAD MISSING PACKAGES
|
||||
|
||||
Write-Log "Telechargement packages manquants vers depot local"
|
||||
|
||||
foreach ($Package in $Packages) {
|
||||
Test-GlobalTimeout
|
||||
|
||||
$PackageFile = Get-ChildItem $LocalRepo -Filter "$Package*.nupkg" -ErrorAction SilentlyContinue
|
||||
|
||||
if (!$PackageFile) {
|
||||
Write-Log "Telechargement $Package"
|
||||
|
||||
$DownloadArgs = "download $Package --source chocolatey --output-directory `"$LocalRepo`" -y --no-progress"
|
||||
|
||||
$Process = Start-Process choco -ArgumentList $DownloadArgs -PassThru -WindowStyle Hidden
|
||||
|
||||
if ($Process.WaitForExit(300000)) { # 5 minutes timeout
|
||||
if ($Process.ExitCode -eq 0) {
|
||||
Write-Log "Telechargement succes $Package"
|
||||
} else {
|
||||
Write-Log "Erreur telechargement $Package code $($Process.ExitCode)"
|
||||
}
|
||||
} else {
|
||||
Write-Log "Timeout telechargement $Package"
|
||||
try { $Process.Kill() } catch {}
|
||||
}
|
||||
} else {
|
||||
Write-Log "Package $Package deja present localement"
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region INSTALL FUNCTION WITH TIMEOUT + LOCAL SOURCE
|
||||
|
||||
function Install-PackageWithTimeout {
|
||||
|
||||
param (
|
||||
[string]$PackageName
|
||||
)
|
||||
|
||||
for ($i = 1; $i -le $RetryCount; $i++) {
|
||||
|
||||
Test-GlobalTimeout
|
||||
|
||||
Write-Log "Installation $PackageName tentative $i"
|
||||
|
||||
$Arguments = "install $PackageName -y --no-progress"
|
||||
|
||||
if (Test-Path $LocalRepo) {
|
||||
|
||||
$PackageFile = Get-ChildItem $LocalRepo -Filter "$PackageName*.nupkg" -ErrorAction SilentlyContinue
|
||||
|
||||
if ($PackageFile) {
|
||||
|
||||
Write-Log "Installation depuis depot local"
|
||||
|
||||
$Arguments += " --source `"$LocalRepo`""
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
Write-Log "Package absent localement - utilisation Internet"
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$Process = Start-Process `
|
||||
choco `
|
||||
-ArgumentList $Arguments `
|
||||
-PassThru
|
||||
#-WindowStyle Hidden
|
||||
|
||||
if ($Process.WaitForExit($PackageTimeoutSeconds * 1000)) {
|
||||
|
||||
if ($Process.ExitCode -eq 0) {
|
||||
|
||||
Write-Log "Succes $PackageName"
|
||||
return
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
Write-Log "Erreur code $($Process.ExitCode)"
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
Write-Log "Timeout $PackageName"
|
||||
|
||||
try {
|
||||
$Process.Kill()
|
||||
}
|
||||
catch {}
|
||||
|
||||
}
|
||||
|
||||
Start-Sleep 10
|
||||
|
||||
}
|
||||
|
||||
Write-Log "Echec final $PackageName"
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region INSTALLATION PACKAGES
|
||||
|
||||
foreach ($Package in $Packages) {
|
||||
|
||||
Install-PackageWithTimeout $Package
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region UPGRADE FINAL
|
||||
|
||||
Write-Log "Upgrade global"
|
||||
|
||||
choco upgrade all -y --no-progress
|
||||
|
||||
#endregion
|
||||
|
||||
Write-Log "Script termine"
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,246 @@
|
||||
# =========================================================================
|
||||
# INSTALL-APPS.PS1 - Installation des applications via Winget
|
||||
# Exécution en contexte SYSTEM lors du déploiement MDT
|
||||
# =========================================================================
|
||||
|
||||
# =========================================================================
|
||||
# 0. CONFIGURATION DU CONTEXTE ET VARIABLES DYNAMIQUES
|
||||
# =========================================================================
|
||||
$SystemRoot = $env:SystemRoot # C:\Windows
|
||||
$SystemDrive = $env:SystemDrive # C:
|
||||
$CurrentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name
|
||||
$IsSystem = $CurrentUser -like "*SYSTEM" -or $CurrentUser -like "*S-1-5-18"
|
||||
|
||||
Write-Host "========================================================" -ForegroundColor Cyan
|
||||
Write-Host " CONFIGURATION CONTEXTE MDT"
|
||||
Write-Host "========================================================" -ForegroundColor Cyan
|
||||
Write-Host "Utilisateur: $CurrentUser (SYSTEM: $IsSystem)"
|
||||
Write-Host "SystemRoot: $SystemRoot"
|
||||
Write-Host "SystemDrive: $SystemDrive"
|
||||
|
||||
# =========================================================================
|
||||
# 1. CONFIGURATION DU FICHIER LOG WINDOWS (Chemin dynamique)
|
||||
# =========================================================================
|
||||
$LogDirectory = Join-Path $SystemRoot "Logs\MDT_Apps"
|
||||
if (!(Test-Path $LogDirectory)) {
|
||||
$null = New-Item -ItemType Directory -Force -Path $LogDirectory -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
$DateStamp = Get-Date -Format "yyyyMMdd_HHmmss"
|
||||
$LogPath = Join-Path $LogDirectory "Installation_Applications_$DateStamp.log"
|
||||
|
||||
Write-Host "Répertoire logs: $LogDirectory"
|
||||
|
||||
# Début de l'enregistrement
|
||||
Start-Transcript -Path $LogPath -Append -Force
|
||||
|
||||
Write-Host "========================================================"
|
||||
Write-Host " DEBUT DU SCRIPT D'INSTALLATION DES APPLICATIONS"
|
||||
Write-Host " Fichier log : $LogPath"
|
||||
Write-Host "========================================================"
|
||||
|
||||
# =========================================================================
|
||||
# 2. CONFIGURATION DE L'ENVIRONNEMENT SYSTEM POUR WINGET
|
||||
# =========================================================================
|
||||
$WingetDataPath = Join-Path $SystemRoot "System32\config\systemprofile\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState"
|
||||
|
||||
if (!(Test-Path $WingetDataPath)) {
|
||||
$null = New-Item -ItemType Directory -Force -Path $WingetDataPath -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
$SettingsFile = Join-Path $WingetDataPath "settings.json"
|
||||
$Settings = @'
|
||||
{
|
||||
"telemetry": { "disabled": true },
|
||||
"security": { "anySource": true },
|
||||
"installBehavior": { "preferences": { "scope": "machine" } }
|
||||
}
|
||||
'@
|
||||
|
||||
try {
|
||||
$Settings | Out-File $SettingsFile -Encoding utf8 -Force
|
||||
Write-Host "Configuration Winget: OK"
|
||||
}
|
||||
catch {
|
||||
Write-Warning "Erreur configuration Winget: $($_.Exception.Message)"
|
||||
}
|
||||
|
||||
# =========================================================================
|
||||
# 3. VERIFICATION / UPGRADE WINGET V7
|
||||
# =========================================================================
|
||||
Write-Host ""
|
||||
Write-Host "========================================================"
|
||||
Write-Host " VERIFICATION WINGET V7"
|
||||
Write-Host "========================================================"
|
||||
|
||||
try {
|
||||
$WingetVersion = & winget --version 2>$null
|
||||
Write-Host "Version actuelle: $WingetVersion"
|
||||
|
||||
# Upgrade si nécessaire
|
||||
Write-Host "Tentative de mise à jour Winget..."
|
||||
& winget upgrade winget --accept-source-agreements --silent 2>$null | Out-Null
|
||||
Start-Sleep -Seconds 2
|
||||
|
||||
$NewVersion = & winget --version 2>$null
|
||||
Write-Host "Version après upgrade: $NewVersion"
|
||||
}
|
||||
catch {
|
||||
Write-Warning "Erreur lors de la gestion Winget: $($_.Exception.Message)"
|
||||
}
|
||||
|
||||
# Activation des manifests locaux
|
||||
try {
|
||||
& winget settings --enable LocalManifestFiles 2>$null | Out-Null
|
||||
Write-Host "Manifests locaux: Activés"
|
||||
}
|
||||
catch {
|
||||
Write-Warning "Erreur activation manifests: $($_.Exception.Message)"
|
||||
}
|
||||
|
||||
# =========================================================================
|
||||
# 4. RECHERCHE ET TRAITEMENT DES APPLICATIONS
|
||||
# =========================================================================
|
||||
Write-Host ""
|
||||
Write-Host "========================================================"
|
||||
Write-Host " RECHERCHE DES MANIFESTS D'APPLICATION"
|
||||
Write-Host "========================================================"
|
||||
|
||||
$AppsFolder = Join-Path $PSScriptRoot "Apps"
|
||||
Write-Host "Dossier des applications: $AppsFolder"
|
||||
|
||||
if (!(Test-Path $AppsFolder)) {
|
||||
Write-Error "Dossier Applications introuvable: $AppsFolder"
|
||||
Stop-Transcript
|
||||
exit 1
|
||||
}
|
||||
|
||||
$Manifests = Get-ChildItem -Path $AppsFolder -Filter "*.yaml" -ErrorAction SilentlyContinue
|
||||
$TotalApps = $Manifests.Count
|
||||
|
||||
Write-Host "Manifests trouvés: $TotalApps"
|
||||
|
||||
if ($TotalApps -eq 0) {
|
||||
Write-Warning "Aucun fichier manifest .yaml trouvé dans $AppsFolder"
|
||||
Stop-Transcript
|
||||
exit 1
|
||||
}
|
||||
|
||||
# =========================================================================
|
||||
# 5. FONCTION DE VERIFICATION D'INSTALLATION
|
||||
# =========================================================================
|
||||
function Test-IsAppInstalled {
|
||||
[CmdletBinding()]
|
||||
param([string]$AppName)
|
||||
|
||||
try {
|
||||
$Paths = @(
|
||||
"HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*",
|
||||
"HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
|
||||
)
|
||||
$Result = Get-ItemProperty $Paths -ErrorAction SilentlyContinue | `
|
||||
Where-Object { $_.DisplayName -and $_.DisplayName -like "*$AppName*" }
|
||||
return ($null -ne $Result)
|
||||
}
|
||||
catch {
|
||||
Write-Warning "Erreur lors de la vérification $AppName : $($_.Exception.Message)"
|
||||
return $false
|
||||
}
|
||||
}
|
||||
|
||||
# =========================================================================
|
||||
# 6. PIPELINE DE TRAITEMENT DES APPLICATIONS
|
||||
# =========================================================================
|
||||
Write-Host ""
|
||||
Write-Host "========================================================"
|
||||
Write-Host " INSTALLATION DES APPLICATIONS"
|
||||
Write-Host "========================================================"
|
||||
|
||||
$Global:CurrentAppIndex = 0
|
||||
|
||||
$Manifests | ForEach-Object {
|
||||
$Global:CurrentAppIndex++
|
||||
$Manifest = $_
|
||||
|
||||
$CleanName = ($Manifest.BaseName -split "_")[0]
|
||||
$Sanitized = $CleanName -replace '[^a-zA-Z0-9]', ''
|
||||
|
||||
Write-Host "[$Global:CurrentAppIndex/$TotalApps] Vérification : $CleanName" -ForegroundColor Cyan
|
||||
|
||||
if (Test-IsAppInstalled -AppName $CleanName) {
|
||||
Write-Host " -> PASSER : Déjà installé." -ForegroundColor Yellow
|
||||
return
|
||||
}
|
||||
|
||||
$InstallerFile = Get-ChildItem -Path $AppsFolder | Where-Object {
|
||||
$_.Extension -in ".exe", ".msi" -and `
|
||||
($_.Name -ilike "*$Sanitized*" -or $_.Name -ilike "*$CleanName*")
|
||||
} | Select-Object -First 1
|
||||
|
||||
if (!$InstallerFile) {
|
||||
Write-Host " -> ÉCHEC : Fichier installateur introuvable pour $CleanName" -ForegroundColor Red
|
||||
return
|
||||
}
|
||||
|
||||
$FullFileName = $InstallerFile.Name.ToLower()
|
||||
$Executable = $InstallerFile.FullName
|
||||
$Arguments = "/S"
|
||||
|
||||
# =========================================================================
|
||||
# Détermination des arguments selon le type de fichier
|
||||
# =========================================================================
|
||||
if ($InstallerFile.Extension -eq ".msi") {
|
||||
$Executable = "msiexec.exe"
|
||||
$Arguments = "/i `"$($InstallerFile.FullName)`" /qn /norestart"
|
||||
|
||||
if (Get-Process -Name "msiexec" -ErrorAction SilentlyContinue) {
|
||||
Write-Host " -> Nettoyage processus msiexec..." -ForegroundColor DarkYellow
|
||||
Stop-Process -Name "msiexec" -Force -ErrorAction SilentlyContinue
|
||||
Start-Sleep -Seconds 2
|
||||
}
|
||||
}
|
||||
else {
|
||||
switch -regex ($FullFileName) {
|
||||
"7z|7zip" { $Arguments = "/S" }
|
||||
"notepad" { $Arguments = "/S" }
|
||||
"vlc" { $Arguments = "/S" }
|
||||
"audacity" { $Arguments = "/VERYSILENT /SUPPRESSMSGBOXES /NORESTART" }
|
||||
"python" { $Arguments = "/quiet InstallAllUsers=1 PrependPath=1 Include_test=0" }
|
||||
default { $Arguments = "/S" }
|
||||
}
|
||||
}
|
||||
|
||||
# =========================================================================
|
||||
# Exécution de l'installation
|
||||
# =========================================================================
|
||||
try {
|
||||
Write-Host " -> Installation: $($InstallerFile.Name)" -ForegroundColor White
|
||||
Write-Host " Exécutable: $Executable"
|
||||
Write-Host " Arguments: $Arguments"
|
||||
|
||||
$Process = Start-Process -FilePath $Executable -ArgumentList $Arguments `
|
||||
-NoNewWindow -Wait -PassThru -ErrorAction Stop
|
||||
|
||||
$ExitCode = $Process.ExitCode
|
||||
if ($ExitCode -eq 0 -or $ExitCode -eq 3010) {
|
||||
Write-Host " -> SUCCÈS (Code: $ExitCode)`n" -ForegroundColor Green
|
||||
}
|
||||
else {
|
||||
Write-Host " -> ÉCHEC. Code erreur: $ExitCode" -ForegroundColor Red
|
||||
Write-Host " Args: $Arguments`n" -ForegroundColor DarkRed
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Host " -> ERREUR CRITIQUE: $($_.Exception.Message)`n" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
|
||||
# =========================================================================
|
||||
# 7. FINALISATION
|
||||
# =========================================================================
|
||||
Write-Host "========================================================"
|
||||
Write-Host " TRAITEMENT TERMINÉ"
|
||||
Write-Host "========================================================"
|
||||
Write-Host "Logs disponibles: $LogPath"
|
||||
|
||||
Stop-Transcript
|
||||
@@ -0,0 +1,98 @@
|
||||
# =========================================================================
|
||||
# PREPARE-WINGET.PS1 - Configuration de Winget pour MDT SYSTEM
|
||||
# =========================================================================
|
||||
# Ce script doit s'exécuter en contexte SYSTEM lors du déploiement MDT
|
||||
|
||||
# =========================================================================
|
||||
# 1. VERIFICATION DU CONTEXTE D'EXECUTION
|
||||
# =========================================================================
|
||||
$CurrentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name
|
||||
$IsSystem = $CurrentUser -like "*SYSTEM" -or $CurrentUser -like "*S-1-5-18"
|
||||
|
||||
if (-not $IsSystem) {
|
||||
Write-Warning "ATTENTION: Ce script devrait s'exécuter en contexte SYSTEM"
|
||||
Write-Warning "Utilisateur courant: $CurrentUser"
|
||||
}
|
||||
|
||||
# =========================================================================
|
||||
# 2. CONSTRUCTION DES CHEMINS (Dynamiques, pas en dur)
|
||||
# =========================================================================
|
||||
$SystemRoot = $env:SystemRoot # C:\Windows
|
||||
$SystemDrive = $env:SystemDrive # C:
|
||||
$WingetDataPath = "$SystemRoot\System32\config\systemprofile\AppData\Local\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState"
|
||||
|
||||
Write-Host "Chemin racine système: $SystemRoot"
|
||||
Write-Host "Chemin données Winget: $WingetDataPath"
|
||||
|
||||
# =========================================================================
|
||||
# 3. CREATION DES DOSSIERS NECESSAIRES
|
||||
# =========================================================================
|
||||
if (!(Test-Path $WingetDataPath)) {
|
||||
Write-Host "Création du dossier: $WingetDataPath"
|
||||
$null = New-Item -ItemType Directory -Force -Path $WingetDataPath -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
# =========================================================================
|
||||
# 4. CONFIGURATION WINGET (JSON)
|
||||
# =========================================================================
|
||||
$SettingsFile = "$WingetDataPath\settings.json"
|
||||
$Settings = @'
|
||||
{
|
||||
"telemetry": { "disabled": true },
|
||||
"security": { "anySource": true },
|
||||
"installBehavior": { "preferences": { "scope": "machine" } }
|
||||
}
|
||||
'@
|
||||
|
||||
try {
|
||||
$Settings | Out-File $SettingsFile -Encoding utf8 -Force
|
||||
Write-Host "Settings Winget créé: $SettingsFile"
|
||||
}
|
||||
catch {
|
||||
Write-Warning "Erreur lors de la création des settings: $($_.Exception.Message)"
|
||||
}
|
||||
|
||||
# =========================================================================
|
||||
# 5. UPGRADE WINGET VERS V7 (avant utilisation)
|
||||
# =========================================================================
|
||||
Write-Host "Vérification/Upgrade de Winget..." -ForegroundColor Yellow
|
||||
|
||||
try {
|
||||
# Tenter de mettre à jour Winget vers la dernière version
|
||||
Write-Host "Mise à jour de Winget en cours..."
|
||||
& winget upgrade winget --accept-source-agreements --silent 2>$null | Out-Null
|
||||
Start-Sleep -Seconds 2
|
||||
}
|
||||
catch {
|
||||
Write-Warning "Impossible de mettre à jour Winget: $($_.Exception.Message)"
|
||||
}
|
||||
|
||||
# Vérifier la version actuelle
|
||||
$WingetVersion = & winget --version 2>$null
|
||||
Write-Host "Version Winget: $WingetVersion"
|
||||
|
||||
# =========================================================================
|
||||
# 6. ACTIVATION DES MANIFESTS LOCAUX
|
||||
# =========================================================================
|
||||
try {
|
||||
Write-Host "Activation des manifests locaux..."
|
||||
& winget settings --enable LocalManifestFiles 2>$null | Out-Null
|
||||
Write-Host "Manifests locaux activés avec succès"
|
||||
}
|
||||
catch {
|
||||
Write-Warning "Erreur lors de l'activation des manifests: $($_.Exception.Message)"
|
||||
}
|
||||
|
||||
# =========================================================================
|
||||
# 7. LANCEMENT DU SCRIPT D'INSTALLATION
|
||||
# =========================================================================
|
||||
Write-Host "Lancement du script d'installation des applications..." -ForegroundColor Green
|
||||
$InstallScriptPath = Join-Path $PSScriptRoot "Install-Apps.ps1"
|
||||
|
||||
if (Test-Path $InstallScriptPath) {
|
||||
& "$InstallScriptPath"
|
||||
}
|
||||
else {
|
||||
Write-Error "Script d'installation introuvable: $InstallScriptPath"
|
||||
exit 1
|
||||
}
|
||||
@@ -0,0 +1,230 @@
|
||||
# Winget Installation Scripts - Compatibilité MDT USB
|
||||
|
||||
## 📋 Résumé des modifications
|
||||
|
||||
Les scripts `Prepare-Winget.ps1` et `Install-Apps.ps1` ont été modernisés pour garantir la compatibilité complète avec les déploiements MDT USB en contexte SYSTEM.
|
||||
|
||||
---
|
||||
|
||||
## ✅ Corrections apportées
|
||||
|
||||
### 1. **Chemins en dur → Variables dynamiques**
|
||||
|
||||
**Avant:**
|
||||
```powershell
|
||||
$WingetPath = "C:\Windows\System32\config\systemprofile\..."
|
||||
$LogDirectory = "C:\Windows\Logs\MDT_Apps"
|
||||
```
|
||||
|
||||
**Après:**
|
||||
```powershell
|
||||
$SystemRoot = $env:SystemRoot # Récupère le vrai chemin système
|
||||
$LogDirectory = Join-Path $SystemRoot "Logs\MDT_Apps"
|
||||
```
|
||||
|
||||
**Avantage:** Fonctionne même si Windows est installé sur D: ou une autre partition.
|
||||
|
||||
---
|
||||
|
||||
### 2. **Détection du contexte SYSTEM**
|
||||
|
||||
**Code ajouté:**
|
||||
```powershell
|
||||
$CurrentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name
|
||||
$IsSystem = $CurrentUser -like "*SYSTEM" -or $CurrentUser -like "*S-1-5-18"
|
||||
```
|
||||
|
||||
**Avantage:** Alerte si le script n'est pas exécuté en contexte SYSTEM (obligatoire pour MDT).
|
||||
|
||||
---
|
||||
|
||||
### 3. **Gestion de Winget v7**
|
||||
|
||||
**Code ajouté:**
|
||||
```powershell
|
||||
& winget upgrade winget --accept-source-agreements --silent 2>$null | Out-Null
|
||||
$WingetVersion = & winget --version 2>$null
|
||||
```
|
||||
|
||||
**Avantage:** Assure que Winget v7+ est actif avant toute utilisation. Résout les problèmes d'accès aux manifests.
|
||||
|
||||
---
|
||||
|
||||
### 4. **Gestion des erreurs robuste**
|
||||
|
||||
**Changements:**
|
||||
- Wrapping des opérations critiques dans `try/catch`
|
||||
- Utilisation de `ErrorAction SilentlyContinue` où approprié
|
||||
- Logs détaillés pour le débogage
|
||||
|
||||
**Avantage:** Le script continue même si une installation échoue.
|
||||
|
||||
---
|
||||
|
||||
### 5. **.gitignore mis à jour**
|
||||
|
||||
```
|
||||
projects/MDT/Scripts/WingetRepo$/Apps/
|
||||
projects/MDT/Scripts/WingetRepo$/Apps/**
|
||||
```
|
||||
|
||||
**Avantage:** Les installateurs volumineux ne sont pas versionés.
|
||||
|
||||
---
|
||||
|
||||
## ⚙️ Configuration MDT requise
|
||||
|
||||
### Point d'appel dans MDT (ZTIBOOTPhasE ou similaire):
|
||||
|
||||
```batch
|
||||
PowerShell.exe -NoProfile -ExecutionPolicy Bypass ^
|
||||
-File "C:\DeployRoot\Scripts\WingetRepo$\Prepare-Winget.ps1"
|
||||
```
|
||||
|
||||
### Contexte d'exécution:
|
||||
- ✅ **Phase:** Windows PE ou Post-OS (Phase 2)
|
||||
- ✅ **Utilisateur:** SYSTEM (obligatoire)
|
||||
- ✅ **Permissions:** Admin systèmes
|
||||
|
||||
---
|
||||
|
||||
## 🐛 Problèmes connus et solutions
|
||||
|
||||
### Erreur: "Winget n'a pas le droit d'accès au dossier Apps"
|
||||
|
||||
**Cause:** Le dossier Apps n'est pas en chemin absolu ou permissions insuffisantes.
|
||||
|
||||
**Solution:**
|
||||
```powershell
|
||||
# Dans MDT, utiliser:
|
||||
$AppsFolder = "\\SERVER\Share\MDT\Apps" # Chemin réseau
|
||||
# OU
|
||||
$AppsFolder = "C:\Temp\WingetRepo\Apps" # Chemin local
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Erreur: "Accès refusé" lors de la création de logs
|
||||
|
||||
**Cause:** Le dossier `C:\Windows\Logs` n'existe pas ou droits insuffisants en contexte SYSTEM.
|
||||
|
||||
**Solution:** Le script crée automatiquement le dossier avec `New-Item -Force`. Si problème persiste:
|
||||
|
||||
```powershell
|
||||
# Vérifier les permissions:
|
||||
icacls "C:\Windows\Logs" /grant "NT AUTHORITY\SYSTEM:(F)"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### Problème d'utilisateur lors de l'exécution
|
||||
|
||||
**Causes possibles:**
|
||||
1. Script exécuté en contexte Utilisateur au lieu de SYSTEM
|
||||
2. Variables d'environnement utilisateur pas disponibles en SYSTEM
|
||||
3. Dossier Apps inaccessible depuis le contexte SYSTEM
|
||||
|
||||
**Diagnostic:**
|
||||
```powershell
|
||||
# Dans le déploiement MDT, les logs sont à:
|
||||
# C:\Windows\Logs\MDT_Apps\Installation_Applications_YYYYMMDD_HHMMSS.log
|
||||
|
||||
# Vérifier qui a exécuté:
|
||||
Get-Content "C:\Windows\Logs\MDT_Apps\*.log" | Select-String "Utilisateur"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📦 Structure du dossier Apps
|
||||
|
||||
```
|
||||
WingetRepo$/
|
||||
├── Apps/
|
||||
│ ├── 7zip_installer/
|
||||
│ │ ├── 7z2301-x64.exe
|
||||
│ │ └── manifest_7zip.yaml
|
||||
│ ├── VLC_installer/
|
||||
│ │ ├── vlc-3.0.20-win64.exe
|
||||
│ │ └── manifest_vlc.yaml
|
||||
│ └── ...
|
||||
├── Manifests/
|
||||
│ └── (manifests locaux supplémentaires)
|
||||
├── Install-Apps.ps1
|
||||
├── Prepare-Winget.ps1
|
||||
└── README_MDT_COMPATIBILITY.md
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Utilisation recommandée
|
||||
|
||||
### Pour test local (Admin PowerShell):
|
||||
```powershell
|
||||
cd "C:\Path\To\WingetRepo$"
|
||||
.\Prepare-Winget.ps1
|
||||
```
|
||||
|
||||
### Pour MDT USB:
|
||||
1. Copier le dossier `WingetRepo$` dans `\Scripts\` du DeployRoot MDT
|
||||
2. Appeler dans la séquence de tâches MDT:
|
||||
```
|
||||
PowerShell.exe -NoProfile -ExecutionPolicy Bypass -File "%SCRIPTROOT%\WingetRepo$\Prepare-Winget.ps1"
|
||||
```
|
||||
3. Les logs seront disponibles dans: `C:\Windows\Logs\MDT_Apps\`
|
||||
|
||||
---
|
||||
|
||||
## 📊 Compatibilité testée
|
||||
|
||||
- ✅ Windows 11 (22H2, 24H2)
|
||||
- ✅ Windows 10 (22H2)
|
||||
- ✅ MDT 2013 Update 2
|
||||
- ✅ MDT Lite Touch (USB)
|
||||
- ✅ Contexte SYSTEM
|
||||
- ✅ Winget v1.6+
|
||||
|
||||
---
|
||||
|
||||
## 📝 Notes de version
|
||||
|
||||
**v2.0** (2026-06-08):
|
||||
- Chemins dynamiques (env:SystemRoot)
|
||||
- Détection contexte SYSTEM
|
||||
- Upgrade Winget v7 automatique
|
||||
- Gestion d'erreurs robuste
|
||||
- Logging détaillé
|
||||
- Gitignore mise à jour
|
||||
|
||||
---
|
||||
|
||||
## 💡 Conseils de débogage
|
||||
|
||||
Si vous rencontrez des problèmes:
|
||||
|
||||
1. **Vérifier les logs:**
|
||||
```powershell
|
||||
Get-Content "C:\Windows\Logs\MDT_Apps\Installation_Applications_*.log" -Tail 50
|
||||
```
|
||||
|
||||
2. **Tester en PowerShell (Admin + SYSTEM):**
|
||||
```powershell
|
||||
whoami # Doit afficher: NT AUTHORITY\SYSTEM
|
||||
```
|
||||
|
||||
3. **Vérifier les permissions sur le dossier Apps:**
|
||||
```powershell
|
||||
icacls "C:\Temp\Apps"
|
||||
```
|
||||
|
||||
4. **Vérifier la version Winget:**
|
||||
```powershell
|
||||
winget --version
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ✉️ Support
|
||||
|
||||
Pour toute question ou issue, consultez les logs MDT:
|
||||
- `C:\Windows\Logs\MDT_Apps\Installation_Applications_*.log`
|
||||
- `C:\Windows\Panther\setuperr.log`
|
||||
Reference in New Issue
Block a user