Probleme lancement .bat

Fermé
vemon - 28 nov. 2009 à 14:35
 Stratosphr - 19 févr. 2010 à 00:56
Bonjour,
Voila on ma passé un dossier d'installation d'un jeux.
Ce dossier comporte un .bat et des fichier d'installations.
Au lancement du .bat la fenêtre de console ce lance et se referme automatiquement en 1seconde.
Grace à un Imprime écran j'ai pus voir le message afficher dans la console:
"Tom était inatendu"

Je n'y connait strictement rien en .bat

Quelqu'un sait pourquoi le bat ne marche pas???
A voir également:

2 réponses

heuchuitoumoche
28 nov. 2009 à 17:27
yop
lance tu le bon .bat ??
tous les fichier son til la ???
fait clic drois sur ce .bat puis modifier et colle le code ici !
0
rem Author: Synapse
rem Date: Mar 20th 2009
rem Installer version: 1.0
@echo off
cls
color a
title Tom Clancy's H.A.W.X. Installation
set DR=%CD%\Install Files
set ID=%USERPROFILE%\Games\Tom Clancy's H.A.W.X
set TD=%HOMEDRIVE%\TCH-TMP
set RP=%HOMEPATH%
IF "%PUBLIC%"=="%HOMEDRIVE%\Users\Public" (
set RP=%HOMEDRIVE%\%RP:~0,6%\\%USERNAME%\\Games\\Tom Clancy's H.A.W.X
) else (
set RP=%HOMEDRIVE%\%RP:~0,23%\\%USERNAME%\\Games\\Tom Clancy's H.A.W.X
)
md "%ID%"
cd "%ID%"
del/f/q/s %TD%\>nul
cls
echo.
echo Removing temporary files (please wait)...
del/f/q/s "%ID%\">nul
cls
echo.
echo * Please enable Administrative privldeges and disable User Account Control.
echo if your computer is not as described please exit this program now...
echo * It is recommended that you exit all other applications before installation
echo ==============================================================================
echo * Game: Tom Clancy's H.A.W.X.
echo * Patch version: 1.01
echo * Time needed: ~15+min
echo * Needed Space: 6.44GB
echo * Extracted size: 6.44GB
echo * Game Path: %ID%
echo ==============================================================================
echo.
echo Press any key to begin the installation...
pause>nul
echo.
echo Copying Main.cf2...
xcopy "%DR%\Main.cf2" "%TD%\"/Y/R>nul
echo -Extracting Main.cf2...
move "%TD%\Main.cf2" "%TD%\Main.exe">nul
"%TD%\Main" -y -ao -o"%ID%"
del/f/q "%TD%\Main.exe"
echo Copying Videos.cf2...
xcopy "%DR%\Videos.cf2" "%TD%\"/Y/R>nul
echo -Extracting Videos.cf2...
move "%TD%\Videos.cf2" "%TD%\Videos.exe">nul
"%TD%\Videos" -y -ao -o"%ID%\Data\Movies"
del/f/q "%TD%\Videos.exe"
echo Copying Sounds.cf2...
xcopy "%DR%\Sounds.cf2" "%TD%\"/Y/R>nul
echo -Extracting Sounds.cf2...
move "%TD%\Sounds.cf2" "%TD%\Sounds.exe">nul
"%TD%\Sounds" -y -ao -o"%ID%\Data\Sounds\PC"
del/f/q "%TD%\Sounds.exe"
echo Copying Data_files.cf2...
xcopy "%DR%\Data_files.cf2" "%TD%\"/Y/R>nul
echo -Extracting Data_files.cf2...
move "%TD%\Data_files.cf2" "%TD%\Data_files.exe">nul
"%TD%\Data_files" -y -ao -o"%ID%"
del/f/q "%TD%\Data_files.exe"
echo Copying Data.cf1...
xcopy "%DR%\Data.cf1" "%TD%\"/Y/R>nul
echo -Extracting Data.cf1...
move "%TD%\Data.cf1" "%TD%\Data.uha">nul
"%ID%\redist\debug1" x -y+ -o+ -t"%ID%\Data" "%TD%\Data.uha">nul
title Tom Clancy's H.A.W.X. Installation
del/f/q "%TD%\Data.uha"
echo -Installing Redistributables...
"%ID%\redist\dxwebsetup"/Q>nul
del/f/q "%ID%\redist\dxwebsetup.exe"
echo -Adding Firewall exceptions...
netsh firewall add allowedprogram "%ID%\HAWX.exe" Tom_Clancy's_H.A.W.X_1 ENABLE>nul
netsh firewall add allowedprogram "%ID%\HAWX_dx10.exe" Tom_Clancy's_H.A.W.X_2 ENABLE>nul
echo -Creating desktop shortcut...
"%ID%\redist\Shortcut.exe" /F:"%USERPROFILE%\Desktop\Tom Clancy's H.A.W.X..lnk" /A:C /T:"%ID%\HAWX.exe" /W:"%ID%" /R:1>nul
del/f/q "%ID%\redist\Shortcut.exe"
:loop
cls
echo.
echo Please select your language...
echo.
echo (1) English
echo (2) Francais
echo (3) Deutsch
echo (4) Italiano
echo (5) Espanol
echo.
set/p lang="Language #: "
IF "%lang%"=="1" (
set lang=00000009
goto reg
)
IF "%lang%"=="2" (
set lang=0000040c
goto reg
)
IF "%lang%"=="3" (
set lang=00000007
goto reg
)
IF "%lang%"=="4" (
set lang=00000010
goto reg
)
IF "%lang%"=="5" (
set lang=0000000a
goto reg
)
goto loop
:reg
echo -Writing Registry data...
echo REGEDIT4>>reg_val.reg
echo.>>reg_val.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Ubisoft\Tom Clancy's H.A.W.X]>>reg_val.reg
echo "language"=dword:%lang%>>reg_val.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Ubisoft\Tom Clancy's H.A.W.X\1.00.00000]>>reg_val.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Ubisoft\Tom Clancy's H.A.W.X\1.01.00000]>>reg_val.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Ubisoft\Tom Clancy's H.A.W.X\GU_DX10]>>reg_val.reg
echo. >>reg_val.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Ubisoft\Tom Clancy's H.A.W.X\GU_DX9\GameUpdate]>>reg_val.reg
echo "execPath"="%RP%\\HAWX.exe">>reg_val.reg
echo "installdir"="%RP%">>reg_val.reg
echo "language"="us">>reg_val.reg
echo "info"="0c6bbe22ec0ce54a91b41f4b93e44607">>reg_val.reg
echo.>>reg_val.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Ubisoft\Tom Clancy's H.A.W.X\GU_DX10\GameUpdate]>>reg_val.reg
echo "execPath"="%RP%\\HAWX_dx10.exe">>reg_val.reg
echo "installdir"="%RP%">>reg_val.reg
echo "language"="us">>reg_val.reg
echo "info"="0c6bbe22ec0ce54a91b41f4b93e44607">>reg_val.reg
echo.>>reg_val.reg
echo [HKEY_LOCAL_MACHINE\SOFTWARE\Ubisoft\Tom Clancy's H.A.W.X\1.01.00000]>>reg_val.reg
regedit/s reg_val.reg
del/f/q reg_val.reg
echo -Removing backup files...
rd %TD%\
cls
echo ====================================================================
echo * Finished Installation. Run Desktop shortcut.
echo ====================================================================
echo RIP NOTES
echo ====================================================================
echo * If you find any issues with running the game, download DirectX at:
echo https://filehippo.com/download_directx/
echo * Please comment on torrent!!
echo * More games at: (www.mininova.org/user/seao111)
echo * Comments, requests, thanks, etc please direct to:
echo Synapse.pcgames@gmail.com
echo *Extras for this game are provided in the EXTRAS folder
echo *If you would like better performance, run HAWX_dx10.exe
:PROMPT
echo.
set/p BROWSE="Open default browser to download latest DirectX an .NET Fix? (Y/N): "
IF "%BROWSE%"=="y" set BROWSE="Y"
IF "%BROWSE%"=="n" set BROWSE="N"
IF %BROWSE%=="N" exit
IF EXIST "%SystemDrive%\Program Files\Mozilla Firefox\firefox.exe" goto OPENFF
IF %BROWSE%=="Y" (
"%SystemDrive%\Program Files\Internet Explorer\iexplore" -extoff -nohome www.filehippo.com/download_directx
"%SystemDrive%\Program Files\Internet Explorer\iexplore" -extoff -nohome www.filehippo.com/download_dotnet_framework_3/tech/1807
exit
)
goto PROMPT
:OPENFF
"%SystemDrive%\Program Files\Mozilla Firefox\firefox" -new-window "www.filehippo.com/download_directx"
"%SystemDrive%\Program Files\Mozilla Firefox\firefox" -new-window "www.filehippo.com/download_dotnet_framework_3/tech/1807"
exit
0
Salut. Crée un dossier "TCH-TMP" dans ton disque local ("C:" en général). Copie tous les fichiers du dossier "Install Files" (je suis convaincu que tu as ce dossier pas vrai ? ;) ) à l'intérieur de "TCH-TMP". Relance ton fichier ".bat", et normalement cela devrait marcher.
0