IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Scripts/Batch Discussion :

Création de script pour support externe


Sujet :

Scripts/Batch

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Nouveau membre du Club
    Homme Profil pro
    Lycéen
    Inscrit en
    Mai 2020
    Messages
    5
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Dordogne (Aquitaine)

    Informations professionnelles :
    Activité : Lycéen
    Secteur : Aéronautique - Marine - Espace - Armement

    Informations forums :
    Inscription : Mai 2020
    Messages : 5
    Par défaut Création de script pour support externe
    Bonsoir,

    Me revoici après avoir essayé de travailler sur mon fichier.
    Voici le code que j'ai réalisé mais je suis confronté à une erreur dont je n'arrive pas à comprendre.

    Code Batch : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    @echo off
    :start
       cls
       echo +++++++++++++++++++++++++++++++++++++
       echo +                            +   
       echo +   INSTALLATION DE WINDOWS 10       +
       echo +                            +
       echo +++++++++++++++++++++++++++++++++++++
       echo.
       set /p ch="Souhaitez vous continuer ? (O=Oui ; N=Non) :"
       cls
    if %ch%==O (
          goto :harddisk
             ) else if %ch%==N (
          goto :start
             winpeinit
                )
     
     
    :: --------------------------------------------------------------------------------
    :: CHOIX DU DISQUE
    :: --------------------------------------------------------------------------------   
     
    :harddisk
    cls
       echo +++++++++++++++++++++++++++++++++++++
       echo +                            +   
       echo +      SELECTION DU DISQUE          +
       echo +                            +
       echo +++++++++++++++++++++++++++++++++++++
     
       diskpart /s hdlist.txt
       echo.
       set /p disknumber="Veuillez choisir le numero du disque :"
     
       call creatediskans.bat %disknumber%
     
       diskpart /s chd.txt
       goto :Menu
       cls
     
     
    :: --------------------------------------------------------------------------------
    :: VERSION DE WINDOWS 10
    :: --------------------------------------------------------------------------------   
     
    :Menu
    cls
       echo +++++++++++++++++++++++++++++++++++++
       echo +                            +   
       echo + CHOIX DE LA VERSION DE WINDOWS 10 +
       echo +                            +
       echo +++++++++++++++++++++++++++++++++++++
     
    :debut
       echo.
       echo Veuillez selectionner le type de Windows 10
       echo.
       set /p choice="A=Version de WINDOWS 10 SANS LES LOGICIELS ; B=Version WINDOWS 10 AVEC LES LOGICIELS"
       echo.
    if %choice%==A (
       set WIN10SA=WINDOWS 10 sans les applications
       echo "Vous avez choisi %WIN10SA%"
       goto :WIN10S
       ) else if %choice%==B (
       set WIN10AA=WINDOWS 10 avec les applications 
       echo "Vous avez choisi %WIN10AA%"
       goto :WIN10A
       ) else (
       cls
    echo.
    echo "<Mauvaise saisie, veuillez bien selectionner votre choix >"
    echo.
    goto :debut
    )
     
     
    :: --------------------------------------------------------------------------------
    :: APPLICATION DE L'IMAGE WIM 
    :: --------------------------------------------------------------------------------
     
    :WIN10S
          cls
          dism /apply-image /imagefile:%LETTER%:\script\install.wim /index:1 /applydir:c:\
    :WIN10A   
          cls
          dism /apply-image /imagefile:%LETTER%:\script\windowsAS.wim /index:1 /applydir:c:\
          echo.
          echo bootmanager will copy to the directory
          echo.
          echo.
       bcdboot c:\windows /L fr-fr
     
     
       exit /b 1


    Voici l'éxecution du script en image :
    Nom : 1.PNG
Affichages : 579
Taille : 176,3 Ko


    Nom : 2.PNG
Affichages : 588
Taille : 221,2 Ko


    Nom : 3.PNG
Affichages : 601
Taille : 197,6 Ko


    Nom : 4.PNG
Affichages : 556
Taille : 207,5 Ko



    Tout le script s'exécute correctement du début jusqu'à une certaine partie.
    Je suis bloqué à la partie du choix entre "A=Version de WINDOWS 10 SANS LES LOGICIELS ; B=Version WINDOWS 10 AVEC LES LOGICIELS"
    Il m'affiche un message d'erreur : Erreur 87 - Paramètre incorrect.
    La commande DISM pour appliquer l'image ne démarre pas.


    Je me pose la question si l'erreur ne vient pas de cette ligne :

    Code Batch : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    :WIN10S
          cls
          dism /apply-image /imagefile:%LETTER%:\script\install.wim /index:1 /applydir:c:\


    Plus précisemment %LETTER%
    car ici je pense qu'il faut je déclare quelque chose car la lettre risque de changer lorsque je vais ce script sur la clé USB.

    Pouvez vous m'aider à y voir plus clair?

  2. #2
    Expert confirmé

    Homme Profil pro
    Responsable déploiement (SCCM, InTune, GPO)
    Inscrit en
    Juillet 2014
    Messages
    3 218
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Responsable déploiement (SCCM, InTune, GPO)
    Secteur : Transports

    Informations forums :
    Inscription : Juillet 2014
    Messages : 3 218
    Par défaut
    Je pense que tu as tout comprit

    Essai comme ceci
    Code batch : Sélectionner tout - Visualiser dans une fenêtre à part
    dism /apply-image /imagefile:%~dp0script\install.wim /index:1 /applydir:c:\

  3. #3
    Nouveau membre du Club
    Homme Profil pro
    Lycéen
    Inscrit en
    Mai 2020
    Messages
    5
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Dordogne (Aquitaine)

    Informations professionnelles :
    Activité : Lycéen
    Secteur : Aéronautique - Marine - Espace - Armement

    Informations forums :
    Inscription : Mai 2020
    Messages : 5
    Par défaut Création de script pour support externe
    Je viens de corriger le script avec la correction à effectuer.

    Code Batch : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    :WIN10S
    		cls
    		dism /apply-image /imagefile:%~dp0script\install.wim /index:1 /applydir:c:\
    :WIN10A	
    		cls
    		dism /apply-image /imagefile:%~dp0script\windowsAS.wim /index:1 /applydir:c:\

    Seulement j'ai toujours un message d'erreur

    Nom : Capture.PNG
Affichages : 540
Taille : 35,9 Ko

    Et si je dois consulter le fichier du journal log, voici le contenu


    2020-10-05 16:17:49, Info DISM PID=6192 TID=9788 Scratch directory set to 'C:\Users\STAGIA~1\AppData\Local\Temp\'. - CDISMManager::put_ScratchDir
    2020-10-05 16:17:49, Info DISM PID=6192 TID=9788 DismCore.dll version: 10.0.18362.1 - CDISMManager::FinalConstruct
    2020-10-05 16:17:49, Info DISM Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
    2020-10-05 16:17:49, Info DISM PID=6192 TID=9788 Successfully loaded the ImageSession at "C:\Windows\system32\Dism" - CDISMManager::LoadLocalImageSession
    2020-10-05 16:17:49, Info DISM Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
    2020-10-05 16:17:49, Info DISM DISM Provider Store: PID=6192 TID=9788 Found and Initialized the DISM Logger. - CDISMProviderStore::Internal_InitializeLogger
    2020-10-05 16:17:49, Info DISM DISM Provider Store: PID=6192 TID=9788 Failed to get and initialize the PE Provider. Continuing by assuming that it is not a WinPE image. - CDISMProviderStore::Final_OnConnect
    2020-10-05 16:17:49, Info DISM DISM Provider Store: PID=6192 TID=9788 Finished initializing the Provider Map. - CDISMProviderStore::Final_OnConnect
    2020-10-05 16:17:49, Info DISM Initialized Panther logging at C:\Windows\Logs\DISM\dism.log
    2020-10-05 16:17:49, Info DISM DISM Manager: PID=6192 TID=9788 Successfully created the local image session and provider store. - CDISMManager::CreateLocalImageSession
    2020-10-05 16:17:49, Info DISM DISM.EXE:
    2020-10-05 16:17:49, Info DISM DISM.EXE: <----- Starting Dism.exe session ----->
    2020-10-05 16:17:49, Info DISM DISM.EXE:
    2020-10-05 16:17:49, Info DISM DISM.EXE: Host machine information: OS Version=10.0.18363, Running architecture=amd64, Number of processors=2
    2020-10-05 16:17:49, Info DISM DISM.EXE: Dism.exe version: 10.0.18362.1
    2020-10-05 16:17:49, Info DISM DISM.EXE: Executing command line: dism /apply-image /imagefile:C:\Users\stagiaire\Documents\script\windowsAS.wim /index:1 /applydir:c:\
    2020-10-05 16:17:49, Info DISM DISM Provider Store: PID=6192 TID=9788 Getting the collection of providers from a local provider store type. - CDISMProviderStore::GetProviderCollection
    2020-10-05 16:17:49, Info DISM DISM Provider Store: PID=6192 TID=9788 Connecting to the provider located at C:\Windows\system32\Dism\FolderProvider.dll. - CDISMProviderStore::Internal_LoadProvider
    2020-10-05 16:17:49, Warning DISM DISM Provider Store: PID=6192 TID=9788 Failed to load the provider: C:\Windows\system32\Dism\SiloedPackageProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
    2020-10-05 16:17:49, Info DISM DISM Provider Store: PID=6192 TID=9788 Connecting to the provider located at C:\Windows\system32\Dism\FfuProvider.dll. - CDISMProviderStore::Internal_LoadProvider
    2020-10-05 16:17:49, Info DISM DISM Provider Store: PID=6192 TID=9788 Connecting to the provider located at C:\Windows\system32\Dism\WimProvider.dll. - CDISMProviderStore::Internal_LoadProvider
    2020-10-05 16:17:49, Info DISM DISM Provider Store: PID=6192 TID=9788 Connecting to the provider located at C:\Windows\system32\Dism\VHDProvider.dll. - CDISMProviderStore::Internal_LoadProvider
    2020-10-05 16:17:49, Info DISM DISM Provider Store: PID=6192 TID=9788 Connecting to the provider located at C:\Windows\system32\Dism\ImagingProvider.dll. - CDISMProviderStore::Internal_LoadProvider
    2020-10-05 16:17:49, Warning DISM DISM Provider Store: PID=6192 TID=9788 Failed to load the provider: C:\Windows\system32\Dism\MetaDeployProvider.dll. - CDISMProviderStore::Internal_GetProvider(hr:0x8007007e)
    2020-10-05 16:17:49, Info DISM DISM.EXE: Got the collection of providers. Now enumerating them to build the command table.
    2020-10-05 16:17:49, Info DISM DISM.EXE: Attempting to add the commands from provider: DISM Log Provider
    2020-10-05 16:17:49, Info DISM DISM.EXE: Attempting to add the commands from provider: FolderManager
    2020-10-05 16:17:49, Info DISM DISM.EXE: Attempting to add the commands from provider: FfuManager
    2020-10-05 16:17:49, Info DISM DISM.EXE: Succesfully registered commands for the provider: FfuManager.
    2020-10-05 16:17:49, Info DISM DISM.EXE: Attempting to add the commands from provider: WimManager
    2020-10-05 16:17:49, Info DISM DISM.EXE: Succesfully registered commands for the provider: WimManager.
    2020-10-05 16:17:49, Info DISM DISM.EXE: Attempting to add the commands from provider: VHDManager
    2020-10-05 16:17:49, Info DISM DISM.EXE: Attempting to add the commands from provider: GenericImagingManager
    2020-10-05 16:17:49, Info DISM DISM.EXE: Succesfully registered commands for the provider: GenericImagingManager.
    [6192] [0x80070005] RestoreDirMetadata:(2542): Accès refusé.
    [6192] [0x8144012d]
    2020-10-05 16:17:50, Warning DISM DISM WIM Provider: PID=6192 [RestoreDirMetadata:(2548) -> Error restoring directory metadata] c:\Program Files\Windows Defender (HRESULT=0x80070005) - CWimManager::WimProviderMsgLogCallback
    [6192] [0x80070005] RestoreDirMetadata:(2708): Accès refusé.
    [6192] [0x80070005] WimCreateDirectory:(3270): Accès refusé.
    [6192] [0xc144012e]
    2020-10-05 16:17:50, Error DISM DISM WIM Provider: PID=6192 c:\Program Files\Windows Defender (HRESULT=0x80070005) - CWimManager::WimProviderMsgLogCallback
    [6192] [0x80070005] RestoreDirTree:(3521): Accès refusé.
    [6192] [0x80070005] WIMApplyImageInternal:(709): Accès refusé.
    2020-10-05 16:17:50, Error DISM DISM WIM Provider: PID=6192 TID=9788 onecore\base\ntsetup\opktools\dism\providers\wimprovider\dll\wimmanager.cpp:970 - CWimManager::Apply(hr:0x80070005)
    2020-10-05 16:17:50, Error DISM DISM Imaging Provider: PID=6192 TID=9788 onecore\base\ntsetup\opktools\dism\providers\imagingprovider\dll\genericimagingmanager.cpp:2828 - CGenericImagingManager::InternalCmdWimApply(hr:0x80070005)
    2020-10-05 16:17:50, Error DISM DISM Imaging Provider: PID=6192 TID=9788 onecore\base\ntsetup\opktools\dism\providers\imagingprovider\dll\genericimagingmanager.cpp:536 - CGenericImagingManager::ExecuteCmdLine(hr:0x80070005)
    2020-10-05 16:17:50, Info DISM DISM.EXE: Image session has been closed. Reboot required=no.
    2020-10-05 16:17:50, Info DISM DISM.EXE:
    2020-10-05 16:17:50, Info DISM DISM.EXE: <----- Ending Dism.exe session ----->
    2020-10-05 16:17:50, Info DISM DISM.EXE:
    2020-10-05 16:17:50, Info DISM DISM Provider Store: PID=6192 TID=9788 Found the OSServices. Waiting to finalize it until all other providers are unloaded. - CDISMProviderStore::Final_OnDisconnect
    2020-10-05 16:17:50, Info DISM DISM Provider Store: PID=6192 TID=9788 Disconnecting Provider: FolderManager - CDISMProviderStore::Internal_DisconnectProvider
    2020-10-05 16:17:50, Info DISM DISM Provider Store: PID=6192 TID=9788 Disconnecting Provider: FfuManager - CDISMProviderStore::Internal_DisconnectProvider
    2020-10-05 16:17:50, Info DISM DISM Provider Store: PID=6192 TID=9788 Disconnecting Provider: WimManager - CDISMProviderStore::Internal_DisconnectProvider
    2020-10-05 16:17:50, Info DISM DISM Provider Store: PID=6192 TID=9788 Disconnecting Provider: VHDManager - CDISMProviderStore::Internal_DisconnectProvider
    2020-10-05 16:17:50, Info DISM DISM Provider Store: PID=6192 TID=9788 Disconnecting Provider: GenericImagingManager - CDISMProviderStore::Internal_DisconnectProvider
    2020-10-05 16:17:50, Info DISM DISM Provider Store: PID=6192 TID=9788 Releasing the local reference to DISMLogger. Stop logging. - CDISMProviderStore::Internal_DisconnectProvider
    Là je suis complètement perdu.

  4. #4
    Expert confirmé

    Homme Profil pro
    Responsable déploiement (SCCM, InTune, GPO)
    Inscrit en
    Juillet 2014
    Messages
    3 218
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 46
    Localisation : France, Seine Saint Denis (Île de France)

    Informations professionnelles :
    Activité : Responsable déploiement (SCCM, InTune, GPO)
    Secteur : Transports

    Informations forums :
    Inscription : Juillet 2014
    Messages : 3 218
    Par défaut
    Ici on voit ta ligne de commande
    dism /apply-image /imagefile:C:\Users\stagiaire\Documents\script\windowsAS.wim /index:1 /applydir:c:\
    Elle doit correspondre a ce que tu voulait (je crois)

    C'est DISM qui te génère une erreur. Je ne suis pas un spécialiste de la commande DISM

    Quelques forum sur le sujet :
    https://social.technet.microsoft.com...apps?forum=mdt
    https://community.spiceworks.com/top...-access-denied
    https://www.dostips.com/forum/viewtopic.php?t=6889

Discussions similaires

  1. Création de script pour appli au démarrage de debian
    Par alpha62 dans le forum Shell et commandes GNU
    Réponses: 1
    Dernier message: 27/12/2013, 18h03
  2. Création de script pour installer tomcat 6
    Par norten dans le forum Tomcat et TomEE
    Réponses: 8
    Dernier message: 08/01/2009, 11h04
  3. (batch) Script pour pouvoir changer de domaine
    Par alex_m94 dans le forum Windows
    Réponses: 7
    Dernier message: 07/09/2007, 18h24
  4. [DOS-BATCH] Création script modif arborescence
    Par stygre dans le forum Windows
    Réponses: 2
    Dernier message: 19/07/2006, 14h02
  5. [Batch] Scripts pour un systeme de backup sur serveur
    Par placebomuse dans le forum Windows
    Réponses: 3
    Dernier message: 22/04/2006, 14h28

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo