@echo off REM Installation client PPD V3.1.39 REM ============================== ver | find "Windows XP" > nul if not errorlevel 1 goto question_1 ver | find "Windows 2000" > nul if not errorlevel 1 goto question_1 goto error :question_1 set CurrentDir=%~dp0 echo. set S= set /p S="Do you want to install Peugeot Planet Diag 3.1.39? [y/n]" if "%S%" == "y" goto verif_IE if "%S%" == "Y" goto verif_IE goto fin :error echo. echo Warning: Peugeot Planet Diag requires Windows 2000 or Windows XP. echo The installation cannot be run under this version of Windows. echo. goto fin REM ------------------------------------------------------------------------ :verif_IE if "%1%"=="/NOIE" goto verif_PPD15 if "%1%"=="/noie" goto verif_PPD15 echo. cscript.exe "%currentDir%utils\ie_version.vbs" //nologo //B 5.5.0.0 if not errorlevel 1 goto NoInfo_IE :Info_IE echo. echo Warning: Peugeot Planet Diag requires Internet Explorer 5.50 or above. cscript.exe "%currentDir%utils\ie_version.vbs" //nologo //B /? echo. set S= set /p S="Do you want to continue installation? [y/n]" if "%S%" == "y" goto verif_PPD15 if "%S%" == "Y" goto verif_PPD15 goto fin :NoInfo_IE REM ------------------------------------------------------------------------ :verif_PPD15 REM ==================== REM début d'installation REM ==================== cls REM test d'existance de PPD 1.5 if exist c:\app\ppdiag\ediag.properties goto question_2 goto verif_PPD30 :question_2 echo. echo Peugeot Planet Diag 1.5 is already installed on this computer. echo Installation 3.1.39 will replace this version, set S= set /p S="Do you want to continue ? [y/n]" if "%S%" == "y" goto backup_ancien if "%S%" == "Y" goto backup_ancien goto fin REM ------------------------------------------------------------------------ :verif_PPD30 REM test d'existance de PPD if exist c:\app\ppdiag\persistent\ediag.properties goto question_3 goto install_suite :question_3 echo. echo Peugeot Planet Diag is already installed on this computer. echo The installation will replace this version, set S= set /p S="Do you want to continue ? [y/n]" if "%S%" == "y" goto backup_ancien if "%S%" == "Y" goto backup_ancien goto fin REM ------------------------------------------------------------------------ :backup_ancien echo. echo Please close PPDIAG software. cscript.exe "%currentDir%utils\old_config.vbs" //nologo //B echo. echo Press any key to continue... pause>nul echo. echo Please wait... goto save_properties :backup_ancien_fin if not exist c:\app\ppdiag\ppd.bat goto next_backup_ancien_fin start /b c:\app\ppdiag\ppd.bat stop >NUL REM wait a little to be PPD has been stopped ping 1.1.1.1 -n 5 -w 1000 >NUL :next_backup_ancien_fin if not exist c:\app\ppdiag_old\ rename c:\app\ppdiag ppdiag_old >NUL if exist c:\app\ppdiag rd c:\app\ppdiag /s /q >NUL attrib +h c:\app\ppdiag_old >NUL Rem Cette installation n'installe plus le cable ACTIA goto install_suite REM ------------------------------------------------------------------------ :save_properties if exist c:\app\ppdiag\ediag.properties goto save_PPD15 if exist c:\app\ppdiag\persistent\ediag.properties goto save_PPD30 goto backup_ancien_fin :save_PPD15 xcopy c:\app\ppdiag\ediag.properties %temp%\ /R /Y >NUL goto backup_ancien_fin :save_PPD30 xcopy c:\app\ppdiag\persistent\ediag.properties %temp%\ /R /Y >NUL goto backup_ancien_fin REM ------------------------------------------------------------------------ :install_suite REM ==================== REM début d'installation REM ==================== cls echo ================================== echo = Peugeot Planet Diag 3.1.39 = echo = Installation and configuration = echo ================================== echo. echo Java Plugin uninstallation (if it exists) in progress... if exist %SystemRoot%\Prefetch\J2RE-1_3_1_08-WINDOWS-I586-I.-*.pf start /w "" RunDll32 "%CommonProgramFiles%\INSTALLSHIELD\engine\6\INTEL 32\Ctor.dll",LaunchSetup "C:\Program Files\InstallShield Installation Information\{B11CAD0E-0E0F-11D7-88BE-0050DA21757E}\Setup.exe" -uninst echo. Rem Cette installation n'installe plus le cable ACTIA rem echo Peugeot Planet Interface drivers installation in progress... rem xcopy "%CurrentDir%cable\ACTIAUSB.inf" %SystemRoot%\inf\ /R /Y >nul rem xcopy "%CurrentDir%cable\VCommUSB.sys" %SystemRoot%\system32\Drivers\ /R /Y >nul rem attrib -r %SystemRoot%\inf\ACTIAUSB.inf rem attrib -r %SystemRoot%\system32\Drivers\VCommUSB.sys rem rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 %SystemRoot%\inf\ACTIAUSB.inf rem echo. echo Peugeot Planet Diag client installation in progress... xcopy "%CurrentDir%ppdiag\*.*" c:\app\ppdiag\*.* /E /R /Y >nul xcopy "%currentDir%utils\ppd.ico" c:\app\ppdiag\ /R /Y >nul attrib -r c:\app\ppdiag\*.* /S echo. echo Java Plugin installation in progress... if not exist c:\app\ppdiag\log md c:\app\ppdiag\log start /w "" "%currentdir%utils\j2re\j2re-1_4_1_05-windows-i586-i.exe" -s -a -iexplorer -s -f1"%currentDir%utils\j2re\i1_4_1_05.iss" -f2c:\app\ppdiag\log\install_jre.log %systemroot%\regedit /s "%currentDir%utils\PPDClient.reg" if exist "%userprofile%\desktop\Java Web Start.lnk" del /F /Q "%userprofile%\desktop\Java Web Start.lnk" cscript.exe "%currentDir%utils\gestcomm.vbs" //nologo //B cscript.exe "%currentDir%utils\finish.vbs" //nologo //B REM Lancement du serveur client. start /b c:\app\ppdiag\ppd start echo. echo. echo Peugeot Planet Diag 3.1.39 is now installed on this computer. REM ------------------------------------------------------------------------ :fin echo. echo Press any key to close this window. pause> nul exit 1