Salut tout le monde,

J'ai un soucis lorsque je souhaite lancer un .exe via un script en .bat
Je vous colle mon code :

Code : 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
IF EXIST "C:\SEPprep.exe" goto chemin
IF EXIST "C:\SEPprep64.exe" goto chemin
IF EXIST "C:\SEPprep.ini" goto chemin
IF NOT EXIST "C:\SEPprep.exe" goto copie
IF NOT EXIST "C:\SEPprep64.exe" goto copie
IF NOT EXIST "C:\SEPprep.ini" goto copie

:copie
XCOPY "\\serveurpartage\Partage\SEPprep.exe" "C:\"
XCOPY "\\serveurpartage\Partage\SEPprep64.exe" "C:\" 
XCOPY "\\serveurpartage\Partage\SEPprep.ini" "C:\" 
goto chemin

:chemin
IF EXIST "%programfiles(x86)%" goto 64b
echo Système 32 bits détecté
cd "C:\"
start "SEPprep.exe"
goto end


:64b
echo Système 64bits détecté
cd "C:\"
start "SEPprep64.exe"
goto end

:end
echo Installation finie
Le problème, c'est que lors du "start "SEPprep.exe" par exemple, il m'ouvre une invite de commande et rien ne se passe.
Si je le lance manuellement, il se lance en silencieux, et tout fonctionne bien.

Savez vous pourquoi, via le .bat, il ne s’exécute pas correctement ?

Merci à vous