Bonjour à tous.
Dernièrement j'ai eu l'aide de barnabe0057 pour un problème au niveau des choix multiples (et je l'en remercie encore).
J'ai fait évoluer mon .bat pour y inclure plusieurs conditions.
Toutes les conditions fonctionnent sauf 2. (lignes 43 et 44).
Quand je fais les tests avec ces conditions, c'est toujours le script de la ligne 23 qui se lance alors que cela devrait être respectivement le script de la ligne 29 et celui de la ligne 33.
Je ne vois pas du tout, où se situe mon erreur.
Merci d'avance pour votre aide.
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 @echo off cd /d C:\Prepa_PC ||exit /b 1 echo /!\ TESTQ /!\ set /p VarQuestion1="Choisissez la marque du PC. Lenovo(L) ou Autre(A)" if "%VarQuestion1%"=="L" (goto :1) if "%VarQuestion1%"=="A" (goto :1) if "%VarQuestion1%" neq L (exit) if "%VarQuestion1%" neq A (exit) :1 set "VarQuestion2=" echo. set /p VarQuestion2="PC Pro(P) ou Perso (H) ?" if /i "%VarQuestion2%"=="P" (goto :9) if /i "%VarQuestion2%"=="H" (goto :9) :2 set "VarQuestion3=" echo. set /p VarQuestion3="32bits(32) ou 64bits(64) ?" if /i "%VarQuestion3%"=="32" (goto :10) if /i "%VarQuestion4%"=="64" (goto :11) echo. :3 call C:\Prepa_PC\PRO\BATCH\ProL.bat :4 call C:\Prepa_PC\PRO\BATCH\Pro.bat :5 call C:\Prepa_PC\PERSO\BATCH\PersoLx32.bat :6 call C:\Prepa_PC\PERSO\BATCH\PersoLx64.bat :7 call C:\Prepa_PC\PERSO\BATCH\Persox32.bat :8 call C:\Prepa_PC\PERSO\BATCH\Persox64.bat :9 if /i "%VarQuestion1%"=="L" if "%VarQuestion2%"=="P" (goto :3) if /i "%VarQuestion1%"=="A" if "%VarQuestion2%"=="P" (goto :4) if /i "%VarQuestion1%"=="L" if "%VarQuestion2%"=="H" (goto :2) if /i "%VarQuestion1%"=="A" if "%VarQuestion2%"=="H" (goto :2) :10 if /i "%VarQuestion1%"=="L" if "%VarQuestion2%"=="H" if "%VarQuestion3%"=="32" (goto :5) if /i "%VarQuestion1%"=="A" if "%VarQuestion2%"=="H" if "%VarQuestion3%"=="32" (goto :7) :11 if /i "%VarQuestion1%"=="L" if "%VarQuestion2%"=="H" if "%VarQuestion3%"=="64" (goto :6) if /i "%VarQuestion1%"=="A" if "%VarQuestion2%"=="H" if "%VarQuestion3%"=="64" (goto :8) exit /b 0 pause
Partager