14/04/2023 22:22 Exemples de scripts | Microsoft Learn
Exemples de scripts
Article • 27/09/2022
Télécharger les exemples de scripts utilisés dans ce laboratoire
Copiez ces scripts à la racine de votre lecteur USB de stockage. Reportez-vous à cette
page pour comprendre ce qui se trouve dans les scripts.
Les exemples de téléchargement ZIP des scripts incluent tous les scripts ci-dessous :
Scripts de déploiement d’images
Les scripts suivants configurent Windows appareils à l’aide d’un fichier d’image WIM ou
FFU, puis offrent la possibilité de configurer les fonctionnalités de réinitialisation par
bouton push.
Les fichiers suivants composent les scripts de déploiement :
ApplyImage.bat
ApplyRecovery.bat
CreatePartitions-BIOS.txt
CreatePartitions-BIOS-FFU.txt
CreatePartitions-UEFI.txt
CreatePartitions-UEFI-FFU.txt
HideRecoveryPartitions-BIOS.txt
HideRecoveryPartitions-UEFI.txt
CreateRecoveryPartitions-BIOS.txt
CreateRecoveryPartitions-UEFI.txt
ApplyImage.bat
Utilisez ce script pour appliquer une image Windows à un nouvel appareil.
Note: Si vous copiez et collez le contenu ci-dessous pour créer un fichier .bat, vous
pouvez obtenir une erreur lors de la détection du microprogramme. Pour que la
détection du microprogramme réussisse, assurez-vous que les lignes qui commencent
for /f "tokens=2* delims= " %%A ont un onglet suivi d’un espace entre delims= et "
%%A .
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserve… 1/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
@echo Apply-Image.bat
@echo Run from the reference device in the WinPE environment.
@echo.
@echo This script erases the primary hard drive and applies a new image.
@echo.
@echo Make sure that this script is run from the folder that contains
the
@echo supporting scripts
@echo.
@echo UPDATE (November 2017)
@echo * Added support for FFU deployments.
@echo.
@echo UPDATE (JULY 2016):
@echo * This script stops just after applying the image.
@echo This gives you an opportunity to add siloed provisioning packages
(SPPs)
@echo so that you can include them in your recovery tools.
@echo.
@echo After the script is complete, use apply-recovery.bat to finish
@echo setting up the recovery tools.
@echo.
@echo * This script creates a now includes support for the /EA variables for
quicker
@echo image capture and recovery.
@echo.
@echo * This script now includes support for the /EA variables for quicker
@echo image capture and recovery.
@echo.
@echo * This script now checks to see if you're booted into Windows PE.
@echo.
@if not exist X:\Windows\System32 echo ERROR: This script is built to run in
Windows PE.
@if not exist X:\Windows\System32 goto END
@if %1.==. echo ERROR: To run this script, add a path to a Windows image
file.
@if %1.==. echo Example: ApplyImage D:\WindowsWithFrench.wim
@if %1.==. goto END
@echo *********************************************************************
@echo == Setting high-performance power scheme to speed deployment ==
@call powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
@echo *********************************************************************
@echo Checking to see the type of image being deployed
@if "%~x1" == ".wim" (GOTO WIM)
@if "%~x1" == ".ffu" (GOTO FFU)
@echo *********************************************************************
@if not "%~x1" == ".ffu". if not "%~x1" == ".wim" echo Please use this
script with a WIM or FFU image.
@if not "%~x1" == ".ffu". if not "%~x1" == ".wim" GOTO END
:WIM
@echo Starting WIM Deployment
@echo *********************************************************************
@echo Checking to see if the PC is booted in BIOS or UEFI mode.
wpeutil UpdateBootInfo
for /f "tokens=2* delims= " %%A in ('reg query
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserve… 2/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
HKLM\System\CurrentControlSet\Control /v PEFirmwareType') DO SET
Firmware=%%B
@echo Note: delims is a TAB followed by a space.
@if x%Firmware%==x echo ERROR: Can't figure out which firmware we're on.
@if x%Firmware%==x echo Common fix: In the command above:
@if x%Firmware%==x echo for /f "tokens=2* delims= "
@if x%Firmware%==x echo ...replace the spaces with a TAB character
followed by a space.
@if x%Firmware%==x goto END
@if %Firmware%==0x1 echo The PC is booted in BIOS mode.
@if %Firmware%==0x2 echo The PC is booted in UEFI mode.
@echo *********************************************************************
@echo Do you want to create a Recovery partition?
@echo (If you're going to be working with FFUs, and need
@echo to expand the Windows partition after applying the FFU, type N).
@SET /P RECOVERY=(Y or N):
@if %RECOVERY%.==y. set RECOVERY=Y
@echo Formatting the primary disk...
@if %Firmware%==0x1 echo ...using BIOS (MBR) format and partitions.
@if %Firmware%==0x2 echo ...using UEFI (GPT) format and partitions.
@echo CAUTION: All the data on the disk will be DELETED.
@SET /P READY=Erase all data and continue? (Y or N):
@if %READY%.==y. set READY=Y
@if not %READY%.==Y. goto END
@if %Firmware%.==0x1. if %RECOVERY%.==Y. diskpart /s CreatePartitions-
BIOS.txt
@if %Firmware%.==0x1. if not %RECOVERY%.==Y. diskpart /s CreatePartitions-
BIOS-FFU.txt
@if %Firmware%.==0x2. if %RECOVERY%.==Y. diskpart /s CreatePartitions-
UEFI.txt
@if %Firmware%.==0x2. if not %RECOVERY%.==Y. diskpart /s CreatePartitions-
UEFI-FFU.txt
@echo *********************************************************************
@echo == Apply the image to the Windows partition ==
@SET /P COMPACTOS=Deploy as Compact OS? (Y or N):
@if %COMPACTOS%.==y. set COMPACTOS=Y
@echo Does this image include Extended Attributes?
@echo (If you're not sure, type N).
@SET /P EA=(Y or N):
@if %EA%.==y. set EA=Y
@if %COMPACTOS%.==Y. if %EA%.==Y. dism /Apply-Image /ImageFile:%1
/Index:1 /ApplyDir:W:\ /Compact /EA
@if not %COMPACTOS%.==Y. if %EA%.==Y. dism /Apply-Image /ImageFile:%1
/Index:1 /ApplyDir:W:\ /EA
@if %COMPACTOS%.==Y. if not %EA%.==Y. dism /Apply-Image /ImageFile:%1
/Index:1 /ApplyDir:W:\ /Compact
@if not %COMPACTOS%.==Y. if not %EA%.==Y. dism /Apply-Image /ImageFile:%1
/Index:1 /ApplyDir:W:\
@echo *********************************************************************
@echo == Copy boot files to the System partition ==
W:\Windows\System32\bcdboot W:\Windows /s S:
@echo *********************************************************************
@echo Next steps:
@echo * Add Windows Classic apps (optional):
@echo DISM /Apply-SiloedPackage /ImagePath:W:\
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserve… 3/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
@echo /PackagePath:"D:\App1.spp" /PackagePath:"D:\App2.spp" ...
@echo.
@echo * Configure the recovery partition with ApplyRecovery.bat
@echo.
@echo * Reboot:
@echo exit
@GOTO END
:FFU
@echo Starting FFU Deployment
@echo list disk > x:\listdisks.txt
@echo exit >> x:\listdisks.txt
@diskpart /s x:\listdisks.txt
@del x:\listdisks.txt
@echo Enter the disk number of the drive where you're going to deploy your
FFU (usually 0).
@SET /P DISKNUMBER=(Enter the Disk Number from above):
@echo This will remove all data from disk %DISKNUMBER%. Continue?
@SET /P ERASEALL=(Y or N):
@if %ERASEALL%.==y. set ERASEALL=Y
@if %ERASEALL%==Y DISM /apply-ffu /ImageFile=%1
/ApplyDrive:\\.\PhysicalDrive%DISKNUMBER%
@if not %ERASEALL%==Y GOTO END
@echo FFU applied. Would you like to configure the recovery partition?
@SET /P CONFIGRECOVERY=(Y or N):
@if %CONFIGRECOVERY%.==y. SET CONFIGRECOVERY=Y
@if %CONFIGRECOVERY%==Y ApplyRecovery.bat
@if not %CONFIGRECOVERY%==Y GOTO END
:END
ApplyImage.bat s’appuie sur les scripts DiskPart suivants, qui doivent être placés dans le
même dossier :
Scripts CreatePartitions
Utilisez ces scripts avec DiskPart pour formater et configurer les partitions de disque dur
pour Windows, y compris les outils de récupération. Réglez les tailles des partitions
pour remplir le disque en fonction des besoins.
CreatePartitions-UEFI.txt
ce script crée les partitions des outils de récupération, système, MSR (Microsoft
Reserved) et Windows.
Ce script attribue temporairement les lettres de lecteur suivantes : Système = S,
Windows = W et Récupération = R. La partition MSR (Microsoft Reserved) n’a pas de
lettre. La lettre W est utilisée pour éviter d’éventuels conflits de lettre de lecteur. Après
le redémarrage de l’appareil, la lettre C est attribuée à la partition Windows, tandis que
les autres partitions ne reçoivent aucune lettre de lecteur.
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserve… 4/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
La partition de récupération doit être la partition après la partition Windows pour vous
assurer que winre.wim peut être conservée à jour pendant la durée de vie de l’appareil.
Le diagramme ci-après illustre la configuration des partitions résultante :
rem == CreatePartitions-UEFI.txt ==
rem == These commands are used with DiskPart to
rem create four partitions
rem for a UEFI/GPT-based PC.
rem Adjust the partition sizes to fill the drive
rem as necessary. ==
select disk 0
clean
convert gpt
rem == 1. System partition =========================
create partition efi size=100
rem ** NOTE: For Advanced Format 4Kn drives,
rem change this value to size = 260 **
format quick fs=fat32 label="System"
assign letter="S"
rem == 2. Microsoft Reserved (MSR) partition =======
create partition msr size=16
rem == 3. Windows partition ========================
rem == a. Create the Windows partition ==========
create partition primary
rem == b. Create space for the recovery tools ===
rem ** Update this size to match the size of
rem the recovery tools (winre.wim)
rem plus some free space.
shrink minimum=500
rem == c. Prepare the Windows partition =========
format quick fs=ntfs label="Windows"
assign letter="W"
rem === 4. Recovery partition ======================
create partition primary
format quick fs=ntfs label="Recovery"
assign letter="R"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
gpt attributes=0x8000000000000001
list volume
exit
CreatePartitions-UEFI-FFU.txt
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserve… 5/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
Ce script est basé sur CreatePartitions-UEFI.txt, mais il ne crée pas de partition de
récupération. C’est pourquoi la partition Windows est la dernière partition sur le lecteur
et peut être développée. Si ce script est utilisé, la partition de récupération peut être
configurée ultérieurement avec ApplyRecovery.bat.
rem == CreatePartitions-UEFI-FFU.txt ==
rem == These commands are used with DiskPart to
rem create four partitions
rem for a UEFI/GPT-based PC.
rem Adjust the partition sizes to fill the drive
rem as necessary. ==
select disk 0
clean
convert gpt
rem == 1. System partition =========================
create partition efi size=100
rem ** NOTE: For Advanced Format 4Kn drives,
rem change this value to size = 260 **
format quick fs=fat32 label="System"
assign letter="S"
rem == 2. Microsoft Reserved (MSR) partition =======
create partition msr size=16
rem == 3. Windows partition ========================
rem == a. Create the Windows partition ==========
create partition primary
rem == c. Prepare the Windows partition =========
format quick fs=ntfs label="Windows"
assign letter="W"
list volume
exit
CreatePartitions-BIOS.txt
ce script crée les partitions système, Windows et des outils de récupération pour les PC
BIOS.
Ce script attribue temporairement les lettres de lecteur suivantes : Système = S,
Windows = W et Récupération = R. La lettre W est utilisée pour éviter d’éventuels
conflits de lettre de lecteur. Après le redémarrage de l’appareil, la lettre C est attribuée à
la partition Windows, tandis que les autres partitions ne reçoivent aucune lettre de
lecteur.
La partition de récupération doit être la partition après la partition Windows pour vous
assurer que winre.wim peut être conservée à jour pendant la durée de vie de l’appareil.
Le diagramme ci-après illustre la configuration des partitions résultante :
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserve… 6/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
rem == CreatePartitions-BIOS.txt ==
rem == These commands are used with DiskPart to
rem create three partitions
rem for a BIOS/MBR-based computer.
rem Adjust the partition sizes to fill the drive
rem as necessary. ==
select disk 0
clean
rem == 1. System partition ======================
create partition primary size=100
format quick fs=ntfs label="System"
assign letter="S"
active
rem == 2. Windows partition =====================
rem == a. Create the Windows partition =======
create partition primary
rem == b. Create space for the recovery tools
rem ** Update this size to match the size of
rem the recovery tools (winre.wim)
rem plus some free space.
shrink minimum=500
rem == c. Prepare the Windows partition ======
format quick fs=ntfs label="Windows"
assign letter="W"
rem == 3. Recovery partition ====================
create partition primary
format quick fs=ntfs label="Recovery image"
assign letter="R"
set id=27
list volume
exit
CreatePartitions-BIOS-FFU.txt
Ce script est basé sur CreatePartitions-BIOS.txt, mais il ne crée pas de partition de
récupération. C’est pourquoi la partition Windows est la dernière partition sur le lecteur
et peut être développée. Si ce script est utilisé, la partition de récupération peut être
configurée ultérieurement avec ApplyRecovery.bat.
rem == CreatePartitions-BIOS-FFU.txt ==
rem == These commands are used with DiskPart to
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserve… 7/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
rem create three partitions
rem for a BIOS/MBR-based computer.
rem Adjust the partition sizes to fill the drive
rem as necessary. ==
select disk 0
clean
rem == 1. System partition ======================
create partition primary size=100
format quick fs=ntfs label="System"
assign letter="S"
active
rem == 2. Windows partition =====================
rem == a. Create the Windows partition =======
create partition primary
rem == c. Prepare the Windows partition ======
format quick fs=ntfs label="Windows"
assign letter="W"
list volume
exit
ApplyRecovery.bat
Utilisez ce script pour préparer la partition de récupération Windows. Ce script est
appelé par ApplyImage.bat, mais peut également être exécuté par lui-même.
Note: Si vous copiez et collez le contenu ci-dessous pour créer un fichier .bat, vous
pouvez obtenir une erreur lors de la détection du microprogramme. Pour que la
détection du microprogramme réussisse, assurez-vous que les lignes qui commencent
for /f "tokens=2* delims= " %%A ont un onglet suivi d’un espace entre delims= et "
%%A .
@echo == ApplyRecovery.bat ==
@rem *********************************************************************
@echo Checking to see if the PC is booted in BIOS or UEFI mode.
wpeutil UpdateBootInfo
for /f "tokens=2* delims= " %%A in ('reg query
HKLM\System\CurrentControlSet\Control /v PEFirmwareType') DO SET
Firmware=%%B
@echo Note: delims is a TAB followed by a space.
@if x%Firmware%==x echo ERROR: Can't figure out which firmware we're on.
@if x%Firmware%==x echo Common fix: In the command above:
@if x%Firmware%==x echo for /f "tokens=2* delims= "
@if x%Firmware%==x echo ...replace the spaces with a TAB character
followed by a space.
@if x%Firmware%==x goto END
@if %Firmware%==0x1 echo The PC is booted in BIOS mode.
@if %Firmware%==0x2 echo The PC is booted in UEFI mode.
@echo *********************************************************************
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserve… 8/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
@echo Do you already have a recovery partition on this disk? (Y or N):
@SET /P RECOVERYEXIST=(Y or N):
@if %RECOVERYEXIST%.==y. set RECOVERYEXIST=Y
@if %RECOVERYEXIST%.==Y. GOTO COPYTOTOOLSPARTITION
@if not %RECOVERYEXIST%.==Y. GOTO CREATEFFURECOVERY
@echo *********************************************************************
:COPYTOTOOLSPARTITION
@echo == Copy the Windows RE image to the Windows RE Tools partition ==
md R:\Recovery\WindowsRE
xcopy /h W:\Windows\System32\Recovery\Winre.wim R:\Recovery\WindowsRE\
@echo *********************************************************************
@echo == Register the location of the recovery tools ==
W:\Windows\System32\Reagentc /Setreimage /Path R:\Recovery\WindowsRE /Target
W:\Windows
@echo *********************************************************************
@IF EXIST W:\Recovery\Customizations\USMT.ppkg (GOTO CUSTOMDATAIMAGEWIM)
else goto HIDEWIMRECOVERYTOOLS
:CUSTOMDATAIMAGEWIM
@echo == If Compact OS, single-instance the recovery provisioning package
==
@echo.
@echo *Note: this step only works if you created a ScanState package
called
@echo USMT.ppkg as directed in the OEM Deployment lab. If you aren't
@echo following the steps in the lab, choose N.
@echo.
@echo Options: N: No
@echo Y: Yes
@echo D: Yes, but defer cleanup steps to first boot.
@echo Use this if the cleanup steps take more than 30 mi‐
nutes.
@echo defer the cleanup steps to the first boot.
@SET /P COMPACTOS=Deploy as Compact OS? (Y, N, or D):
@if %COMPACTOS%.==y. set COMPACTOS=Y
@if %COMPACTOS%.==d. set COMPACTOS=D
@if %COMPACTOS%.==Y. dism /Apply-CustomDataImage
/CustomDataImage:W:\Recovery\Customizations\USMT.ppkg /ImagePath:W:\
/SingleInstance
@if %COMPACTOS%.==D. dism /Apply-CustomDataImage
/CustomDataImage:W:\Recovery\Customizations\USMT.ppkg /ImagePath:W:\
/SingleInstance /Defer
@echo *********************************************************************
:HIDEWIMRECOVERYTOOLS
@echo == Hiding the recovery tools partition
if %Firmware%==0x1 diskpart /s %~dp0HideRecoveryPartitions-BIOS.txt
if %Firmware%==0x2 diskpart /s %~dp0HideRecoveryPartitions-UEFI.txt
@echo *********************************************************************
@echo == Verify the configuration status of the images. ==
W:\Windows\System32\Reagentc /Info /Target W:\Windows
@echo (Note: Windows RE status may appear as Disabled, this is OK.)
@echo *********************************************************************
@echo All done!
@echo Disconnect the USB drive from the reference device.
@echo Type exit to reboot.
@echo.
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserve… 9/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
GOTO END
:CREATEFFURECOVERY
@echo *********************************************************************
@echo == Creating the recovery tools partition
@if %Firmware%==0x1 diskpart /s CreateRecoveryPartitions-BIOS.txt
@if %Firmware%==0x2 diskpart /s CreateRecoveryPartitions-UEFI.txt
@echo finding the Windows Drive
@echo *********************************************************************
@IF EXIST C:\Windows SET windowsdrive=C:\
@IF EXIST D:\Windows SET windowsdrive=D:\
@IF EXIST E:\Windows SET windowsdrive=E:\
@IF EXIST W:\Windows SET windowsdrive=W:\
@echo The Windows drive is %windowsdrive%
md R:\Recovery\WindowsRE
@echo *********************************************************************
@echo Finding Winre.wim
@IF EXIST %windowsdrive%Recovery\WindowsRE\winre.wim SET
recoveryfolder=%windowsdrive%Recovery\WindowsRE\
@IF EXIST %windowsdrive%Windows\System32\Recovery\winre.wim SET
recoveryfolder=%windowsdrive%Windows\System32\Recovery\
@echo *********************************************************************
@echo copying Winre.wim
xcopy /h %recoveryfolder%Winre.wim R:\Recovery\WindowsRE\
@echo *********************************************************************
@echo == Register the location of the recovery tools ==
%windowsdrive%Windows\System32\Reagentc /Setreimage /Path
R:\Recovery\WindowsRE /Target %windowsdrive%Windows
@echo *********************************************************************
@IF EXIST W:\Recovery\Customizations\USMT.ppkg (GOTO CUSTOMDATAIMAGEFFU)
else goto HIDERECOVERYTOOLSFFU
:CUSTOMDATAIMAGEFFU
@echo == If Compact OS, single-instance the recovery provisioning package
==
@echo.
@echo *Note: this step only works if you created a ScanState package
called
@echo USMT.ppkg as directed in the OEM Deployment lab. If you aren't
@echo following the steps in the lab, choose N.
@echo.
@echo Options: N: No
@echo Y: Yes
@echo D: Yes, but defer cleanup steps to first boot.
@echo Use this if the cleanup steps take more than 30 mi‐
nutes.
@echo defer the cleanup steps to the first boot.
@SET /P COMPACTOS=Deploy as Compact OS? (Y, N, or D):
@if %COMPACTOS%.==y. set COMPACTOS=Y
@if %COMPACTOS%.==d. set COMPACTOS=D
@if %COMPACTOS%.==Y. dism /Apply-CustomDataImage
/CustomDataImage:%windowsdrive%Recovery\Customizations\USMT.ppkg
/ImagePath:%windowsdrive% /SingleInstance
@if %COMPACTOS%.==D. dism /Apply-CustomDataImage
/CustomDataImage:%windowsdrive%Recovery\Customizations\USMT.ppkg
/ImagePath:%windowsdrive% /SingleInstance /Defer
:HIDERECOVERYTOOLSFFU
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserv… 10/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
@rem *********************************************************************
@echo == Hiding the recovery tools partition
@if %Firmware%==0x1 diskpart /s HideRecoveryPartitions-BIOS.txt
@if %Firmware%==0x2 diskpart /s HideRecoveryPartitions-UEFI.txt
@echo *********************************************************************
@echo == Verify the configuration status of the images. ==
%windowsdrive%Windows\System32\Reagentc /Info /Target %windowsdrive%Windows
@echo (Note: Windows RE status may appear as Disabled, this is OK.)
@echo *********************************************************************
@echo All done!
@echo Disconnect the USB drive from the reference device.
@echo Type exit to reboot.
@GOTO END
:END
ApplyRecovery.bat s’appuie sur les scripts DiskPart suivants, qui doivent être placés
dans le même dossier :
CreateRecoveryPartitions-UEFI.txt
rem == CreateRecoveryPartitions-UEFI.txt ==
rem == Find and label the Windows partition
rem ** This script assumes the partition layout from
rem CreatePartitions-UEFI or CreatePartitions-UEFI-FFU
select disk 0
select partition 3
assign letter="W"
rem == Extend the Windows partition
extend
rem == Create space for the recovery tools
rem ** Update this size to match the size of
rem the recovery tools (winre.wim)
rem plus some free space.
shrink minimum=500
rem == Create recovery partition
create partition primary
format quick fs=ntfs label="Recovery"
assign letter="R"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
gpt attributes=0x8000000000000001
list volume
exit
CreateRecoveryPartitions-BIOS.txt
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserv… 11/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
rem == CreateRecoveryPartitions-BIOS.txt ==
rem == Find and label the Windows partition
rem ** This script assumes the partition layout from
rem CreatePartitions-BIOS or CreatePartitions-BIOS-FFU
select disk 0
select partition 2
assign letter="W"
rem == Extend the Windows partition ==
shrink minimum=500
extend
rem == Create space for the recovery tools
rem ** Update this size to match the size of the
rem recovery tools (winre.wim), plus some free space.
shrink minimum=500
rem == Prepare the recovery partition ======
select disk 0
create partition primary
format quick fs=ntfs label="Recovery image"
assign letter="R"
set id=27
list volume
exit
HideRecoveryPartitions-UEFI.txt
rem === HideRecoveryPartitions-UEFI.txt ===
rem ** This script assumes the partition layout from
rem CreatePartitions-UEFI or CreatePartitions-UEFI-FFU
select disk 0
select partition 4
set id=de94bba4-06d1-4d40-a16a-bfd50179d6ac
gpt attributes=0x8000000000000001
remove
list volume
exit
HideRecoveryPartitions-BIOS.txt
rem === HideRecoveryPartitions-BIOS.txt ===
rem ** This script assumes the partition layout from
rem CreatePartitions-BIOS or CreatePartitions-BIOS-FFU
select disk 0
select partition 3
set id=27
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserv… 12/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
remove
list volume
exit
Disposition de début (LayoutModification.xml)
La disposition des vignettes Démarrer dans Windows 10 fournit aux OEM la possibilité
d’ajouter des vignettes à la disposition de démarrage par défaut pour inclure des liens
Web, des vignettes secondaires, des applications Windows et des applications de
bureau Windows. Les OEM peuvent rendre cette disposition applicable à plusieurs
régions ou marchés, sans avoir à réexécuter la plupart des tâches. En outre, les
fabricants OEM peuvent ajouter jusqu’à trois applications par défaut à la section des
applications fréquemment utilisées dans la zone du système, qui propose à l’utilisateur
des listes pilotées par le système incluant les emplacements système importants ou
auxquels le système accède souvent, ou encore les applications récemment installées.
Pour tirer parti de toutes ces nouvelles fonctionnalités et bénéficier d’une expérience de
personnalisation du menu Démarrage de Windows 10 aussi robuste et complète que
possible, envisagez la création d’un fichier LayoutModification.xml. Ce fichier indique
comment les vignettes OEM doivent être disposées sur l’écran Démarrage. Pour en
savoir plus sur la personnalisation de la nouvelle disposition de l’écran Démarrage,
consultez la rubrique Personnaliser l’écran Démarrage de Windows 10 de la
documentation des partenaires Windows 10.
Exemple deLayoutModification.xml:
<LayoutModificationTemplate
xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"
xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayo
ut"
xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout"
Version="1">
<RequiredStartGroupsCollection>
<RequiredStartGroups
Region="DE|ES|FR|GB|IT|US">
<AppendGroup Name="Fabrikam Group 1">
<start:DesktopApplicationTile
DesktopApplicationID="Microsoft.Windows.Explorer"
Size="2x2"
Row="0"
Column="4"/>
</AppendGroup>
<AppendGroup
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserv… 13/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
Name="Fabrikam Group 2">
<start:Tile
AppUserModelID="Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge"
Size="2x2"
Row="0"
Column="0"/>
<!-- <start:Tile AppUserModelID="App2!App" Size="2x2" Row="2"
Column="0"/> Update the APUMID to reflect the app you installed with the
region specified -->
</AppendGroup>
</RequiredStartGroups>
<RequiredStartGroups>
<AppendGroup Name="Fabrikam Group 1">
<start:SecondaryTile
AppUserModelID="Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge"
TileID="MyWeblinkTile"
Arguments="http://www.fabrikam.com"
DisplayName="Fabrikam"
Square150x150LogoUri="ms-
appx:///Assets/MicrosoftEdgeSquare150x150.png"
Wide310x150LogoUri="ms-
appx:///Assets/MicrosoftEdgeWide310x150.png"
ShowNameOnSquare150x150Logo="true"
ShowNameOnWide310x150Logo="false"
BackgroundColor="#FF112233"
Size="2x2"
Row="0"
Column="2"/>
<!-- <start:Tile AppUserModelID="App2!App" Size="2x2" Row="2"
Column="0"/> Update the APUMID to reflect the app you installed with no
specific region -->
</AppendGroup>
</RequiredStartGroups>
</RequiredStartGroupsCollection>
<AppendOfficeSuite/>
<AppendOfficeSuiteChoice Choice="DesktopBridgeSubscription"/>
</LayoutModificationTemplate>
TaskbarLayoutModification.xml
Vous pouvez épingler des applications à la barre des tâches. Pour plus d’informations,
consultez les vignettes de la barre des tâches OEM.
<?xml version="1.0" encoding="utf-8"?>
<LayoutModificationTemplate
xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification"
xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayo
ut"
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserv… 14/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout"
xmlns:taskbar="http://schemas.microsoft.com/Start/2014/TaskbarLayout"
Version="1">
<CustomTaskbarLayoutCollection PinListPlacement="Replace">
<defaultlayout:TaskbarLayout>
<taskbar:TaskbarPinList>
<taskbar:UWA
AppUserModelID="Microsoft.Windows.Photos_8wekyb3d8bbwe!App" />
<taskbar:DesktopApp
DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start
Menu\Programs\Accessories\Paint.lnk"/>
</taskbar:TaskbarPinList>
</defaultlayout:TaskbarLayout>
<defaultlayout:TaskbarLayout Region="US|GB">
<taskbar:TaskbarPinList >
<taskbar:DesktopApp
DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start
Menu\Programs\Accessories\Notepad.lnk" />
<taskbar:UWA
AppUserModelID="Microsoft.WindowsCalculator_8wekyb3d8bbwe!App" />
</taskbar:TaskbarPinList>
</defaultlayout:TaskbarLayout>
<defaultlayout:TaskbarLayout Region="CN|TW">
<taskbar:TaskbarPinList>
<taskbar:DesktopApp
DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start
Menu\Programs\Accessories\Notepad.lnk" />
<taskbar:UWA
AppUserModelID="Microsoft.Windows.Photos_8wekyb3d8bbwe!App" />
<taskbar:DesktopApp
DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start
Menu\Programs\Accessories\Paint.lnk"/>
</taskbar:TaskbarPinList>
</defaultlayout:TaskbarLayout>
</CustomTaskbarLayoutCollection>
</LayoutModificationTemplate>
BootToAudit
Ajoutez un fichier de réponse à l’image Windows dans
C:\mount\windows\Windows\Panther\unattend.xml pour lui demander de démarrer en
mode audit. Vous pouvez créer ce fichier de réponses dans l’Assistant Gestion
d’installation.
BootToAudit-x64
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserv… 15/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<!-- BootToAudit-x64.xml -->
<settings pass="oobeSystem">
<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">
<Reseal>
<Mode>Audit</Mode>
</Reseal>
</component>
</settings>
</unattend>
Conservation des paramètres Windows via une
récupération
Windows n’enregistre pas automatiquement les paramètres créés via les fichiers de
configuration unattend.xml, ni les personnalisations du menu Démarrage de Windows
créées via le fichier LayoutModification.xml, pendant une réinitialisation complète du
système, ni les informations de première connexion du fichier oobe.xml.
Pour vous assurer que vos personnalisations ont bien été enregistrées, vous devez
replacer les fichiers unattend.xml, LayoutModification.xml et oobe.xml au bon
emplacement. Voici quelques exemples de scripts qui expliquent comment conserver
ces paramètres et les placer à l’emplacement adéquat. Enregistrez des copies de
unattend.xml, LayoutModification.xml, oobe.xml, ainsi que ces deux fichiers texte :
ResetConfig.xml et EnableCustomizations.cmd, dans C:\Recovery\OEM\:
ResetConfig.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- ResetConfig.xml -->
<Reset>
<Run Phase="BasicReset_AfterImageApply">
<Path>EnableCustomizations.cmd</Path>
<Duration>2</Duration>
</Run>
<Run Phase="FactoryReset_AfterImageApply">
<Path>EnableCustomizations.cmd</Path>
<Duration>2</Duration>
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserv… 16/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
</Run>
</Reset>
EnableCustomizations.cmd
rem EnableCustomizations.cmd
rem Set the variable %TARGETOS% (Typically this is C:\Windows)
for /F "tokens=1,2,3 delims= " %%A in ('reg query
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\RecoveryEnvironment" /v TargetOS') DO
SET TARGETOS=%%C
rem Set the variable %TARGETOSDRIVE% (Typically this is C:)
for /F "tokens=1 delims=\" %%A in ('Echo %TARGETOS%') DO SET
TARGETOSDRIVE=%%A
rem Add back Windows settings, Start menu, and OOBE.xml customizations
copy "%TARGETOSDRIVE%\Recovery\OEM\Unattend.xml"
"%TARGETOS%\Panther\Unattend.xml" /y
copy "%TARGETOSDRIVE%\Recovery\OEM\LayoutModification.xml"
"%TARGETOSDRIVE%\Users\Default\AppData\Local\Microsoft\Windows\Shell\LayoutM
odification.xml" /y
xcopy "%TARGETOSDRIVE%\Recovery\OEM\OOBE\Info" "%TARGETOS%\System32\Info\"
/s
rem Recommended: Create a pagefile for devices with 1GB or less of RAM.
wpeutil CreatePageFile /path=%TARGETOSDRIVE%\PageFile.sys /size=256
Pour en savoir plus sur l’utilisation de points d’extensibilité pour la réinitialisation de
bouton push, consultez Ajouter des scripts d’extensibilité à la réinitialisation de bouton
push.
Réinstaller Windows applications de boîte de
réception
Réinstallez Windows applications après l’ajout d’une nouvelle langue. Vous pouvez
réinstaller d’abord les applications sans les supprimer.
RéinstallerInboxApps-x64.cmd
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserv… 17/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.Getstarted_8wekyb3d8bbwe
.appxbundle /licensepath:.\Appx\Microsoft.Getstarted_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x64.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x86.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x64.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x86.1.6.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.GetHelp_8wekyb3d8bbwe.ap
pxbundle /licensepath:.\Appx\Microsoft.GetHelp_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x64.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x86.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x64.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x86.1.6.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.Messaging_8wekyb3d8bbwe.
appxbundle /licensepath:.\Appx\Microsoft.Messaging_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x64.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x86.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x64.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x86.1.6.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.Microsoft3DViewer_8wekyb
3d8bbwe.appxbundle
/licensepath:.\Appx\Microsoft.Microsoft3DViewer_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserv… 18/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x64.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x86.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x64.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x86.1.7.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.MicrosoftOfficeHub_8weky
b3d8bbwe.appxbundle
/licensepath:.\Appx\Microsoft.MicrosoftOfficeHub_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.MicrosoftSolitaireCollec
tion_8wekyb3d8bbwe.appxbundle
/licensepath:.\Appx\Microsoft.MicrosoftSolitaireCollection_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x64.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x86.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x64.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x86.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.Advertising.Xa
ml.x64.10.0.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.Advertising.Xa
ml.x86.10.0.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.Services.Store
.Engagement.x64.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.Services.Store
.Engagement.x86.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.MicrosoftStickyNotes_8we
kyb3d8bbwe.appxbundle
/licensepath:.\Appx\Microsoft.MicrosoftStickyNotes_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x64.1.6.appx
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserv… 19/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x86.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x64.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x86.1.6.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.MSPaint_8wekyb3d8bbwe.ap
pxbundle /licensepath:.\Appx\Microsoft.MSPaint_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.Office.OneNote_8wekyb3d8
bbwe.appxbundle
/licensepath:.\Appx\Microsoft.Office.OneNote_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.OneConnect_8wekyb3d8bbwe
.appxbundle /licensepath:.\Appx\Microsoft.OneConnect_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x64.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x86.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x64.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x86.1.6.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.People_8wekyb3d8bbwe.app
xbundle /licensepath:.\Appx\Microsoft.People_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x64.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x86.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x64.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x86.1.6.appx
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserv… 20/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.Services.Store
.Engagement.x64.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.Services.Store
.Engagement.x86.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.Advertising.Xa
ml.x64.10.0.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.Advertising.Xa
ml.x86.10.0.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.SkypeApp_kzf8qxf38zg5c.a
ppxbundle /licensepath:.\Appx\Microsoft.SkypeApp_kzf8qxf38zg5c.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x64.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x86.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x64.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x86.1.7.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.StorePurchaseApp_8wekyb3
d8bbwe.appxbundle
/licensepath:.\Appx\Microsoft.StorePurchaseApp_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x64.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x86.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x64.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x86.1.6.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.Wallet_8wekyb3d8bbwe.app
xbundle /licensepath:.\Appx\Microsoft.Wallet_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x64.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x86.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x64.1.7.appx
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserv… 21/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x86.1.7.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.WebMediaExtensions_8weky
b3d8bbwe.appxbundle
/licensepath:.\Appx\Microsoft.WebMediaExtensions_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.Windows.Photos_8wekyb3d8
bbwe.appxbundle
/licensepath:.\Appx\Microsoft.Windows.Photos_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x64.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x86.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x64.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x86.1.7.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.WindowsAlarms_8wekyb3d8b
bwe.appxbundle /licensepath:.\Appx\Microsoft.WindowsAlarms_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.WindowsCalculator_8wekyb
3d8bbwe.appxbundle
/licensepath:.\Appx\Microsoft.WindowsCalculator_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.WindowsCamera_8wekyb3d8b
bwe.appxbundle /licensepath:.\Appx\Microsoft.WindowsCamera_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x64.1.7.appx
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserv… 22/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x86.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x64.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x86.1.7.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.WindowsCommunicationsApp
s_8wekyb3d8bbwe.appxbundle
/licensepath:.\Appx\Microsoft.WindowsCommunicationsApps_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.Advertising.Xa
ml.x64.10.0.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.Advertising.Xa
ml.x86.10.0.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.WindowsFeedbackHub_8weky
b3d8bbwe.appxbundle
/licensepath:.\Appx\Microsoft.WindowsFeedbackHub_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x64.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x86.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x64.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x86.1.7.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.WindowsMaps_8wekyb3d8bbw
e.appxbundle /licensepath:.\Appx\Microsoft.WindowsMaps_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x64.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x86.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x64.1.7.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x86.1.7.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.WindowsSoundRecorder_8we
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserv… 23/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
kyb3d8bbwe.appxbundle
/licensepath:.\Appx\Microsoft.WindowsSoundRecorder_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.WindowsStore_8wekyb3d8bb
we.appxbundle /licensepath:.\Appx\Microsoft.WindowsStore_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x64.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x86.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x64.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x86.1.6.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.XboxApp_8wekyb3d8bbwe.ap
pxbundle /licensepath:.\Appx\Microsoft.XboxApp_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x64.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x86.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x64.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x86.1.6.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.XboxGameOverlay_8wekyb3d
8bbwe.appxbundle
/licensepath:.\Appx\Microsoft.XboxGameOverlay_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.XboxIdentityProvider_8we
kyb3d8bbwe.appxbundle
/licensepath:.\Appx\Microsoft.XboxIdentityProvider_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserv… 24/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x64.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x86.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x64.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x86.1.6.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.XboxSpeechToTextOverlay_
8wekyb3d8bbwe.appxbundle
/licensepath:.\Appx\Microsoft.XboxSpeechToTextOverlay_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.ZuneMusic_8wekyb3d8bbwe.
appxbundle /licensepath:.\Appx\Microsoft.ZuneMusic_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.ZuneVideo_8wekyb3d8bbwe.
appxbundle /licensepath:.\Appx\Microsoft.ZuneVideo_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\microsoft.print3d_8wekyb3d8bbwe.ap
pxbundle /licensepath:.\Appx\microsoft.print3d_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.Xbox.TCUI_8wekyb3d8bbwe.
appxbundle /licensepath:.\Appx\Microsoft.Xbox.TCUI_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x64.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Fra
mework.x86.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserv… 25/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
time.x64.1.6.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.NET.Native.Run
time.x86.1.6.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.XboxGamingOverlay_8wekyb
3d8bbwe.appxbundle
/licensepath:.\Appx\Microsoft.XboxGamingOverlay_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.MixedReality.Portal_8wek
yb3d8bbwe.appxbundle
/licensepath:.\Appx\Microsoft.MixedReality.Portal_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.ScreenSketch_8wekyb3d8bb
we.appxbundle /licensepath:.\Appx\Microsoft.ScreenSketch_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.YourPhone_8wekyb3d8bbwe.
appxbundle /licensepath:.\Appx\Microsoft.YourPhone_8wekyb3d8bbwe.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.HEIFImageExtension_8weky
b3d8bbwe.x64.appx
/licensepath:.\Appx\Microsoft.HEIFImageExtension_8wekyb3d8bbwe.x64.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VP9VideoExtensions_8weky
b3d8bbwe.x64.appx
/licensepath:.\Appx\Microsoft.VP9VideoExtensions_8wekyb3d8bbwe.x64.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserv… 26/27
14/04/2023 22:22 Exemples de scripts | Microsoft Learn
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.WebpImageExtension_8weky
b3d8bbwe.x64.appx
/licensepath:.\Appx\Microsoft.WebpImageExtension_8wekyb3d8bbwe.x64.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
@echo Optional codecs - the following packages are optional depending on
your codec choices and needs
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.HEVCVideoExtension_8weky
b3d8bbwe.x64.appx
/licensepath:.\Appx\Microsoft.HEVCVideoExtension_8wekyb3d8bbwe.x64.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
DISM /image:C:\Mount\Windows /add-ProvisionedAppxPackage
/packagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.MPEG2VideoExtension_8wek
yb3d8bbwe.x64.appx
/licensepath:.\Appx\Microsoft.MPEG2VideoExtension_8wekyb3d8bbwe.x64.xml
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x64.14.
00.appx
/dependencypackagepath:C:\Temp\Lab\Apps\Inbox\amd64\Microsoft.VCLibs.x86.14.
00.appx
Rechercher des lettres de lecteur avec un script
Utilisez ce script dans Windows PE pour identifier un lecteur qui a un dossier appelé «
Images ».
@echo Find a drive that has a folder titled Images.
@for %%a in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do @if exist
%%a:\Images\ set IMAGESDRIVE=%%a
@echo The Images folder is on drive: %IMAGESDRIVE%
@dir %IMAGESDRIVE%:\Images /w
https://learn.microsoft.com/fr-fr/windows-hardware/manufacture/desktop/oem-deployment-of-windows-desktop-editions-sample-scripts?preserv… 27/27