@echo off for /F "tokens=4-5 delims=[.] " %%i in ('ver') do (if %%i==Version (set windowsversion=%%j.%%k) else (set windowsversion=%%i.%%j)) set DVD=%~dp0 set TEXCOL=%DVD%setup\texcollection.exe rem set VCREDIST=%DVD%vcredist\vcredist.x86.exe echo DVD Directory: %DVD% echo Windows-Version: %windowsversion% echo Starting "%TEXCOL%" "%TEXCOL%" IF %ERRORLEVEL% EQU 0 GOTO END echo texcollection.exe failed to start IF NOT %windowsversion%==6.1 GOTO END echo You are running Microsoft Windows 7! echo Please read the file requirements-windows7.txt in the root directory of the DVD. echo Press any key to open this file. rem echo Press any key to open the DVD's root directory and double-click requirements-windows7.txt rem echo to open the file. pause rem %SystemRoot%/explorer.exe "%DVD%" start "requirements-windows7.txt" "%DVD%requirements-windows7.txt" :END