@echo off : windows installer demo batch file : first see if python is already installed and what version set mytemp=%temp%\jcinst if not exist %mytemp% mkdir %mytemp% :install1 echo Checking if Python version 2.3 or better is installed... set pyversion=%mytemp%\testver.py set pyinstall=%mytemp%\pyinst.url echo import sys > %pyversion% echo ver = sys.version_info >> %pyversion% echo sys.exit(ver[0] * 10 + ver[1]) >> %pyversion% echo [InternetShortcut] > %pyinstall% echo URL=http://www.python.org/ftp/python/2.3.3/Python-2.3.3.exe >> %pyinstall% start /wait %pyversion% if errorlevel 24 goto install2 echo You will need to install Python 2.3. I will take you to the site now. echo Save the executable file to your hard drive, then double-click it to echo install it. Make sure to select the option to associate .py files with echo the Python interpreter. pause start /wait %pyinstall% goto install1 :install2 echo Application appears to have been installed correctly. pause