@echo off

Rem Copyright by Jäger Messtechnik GmbH
Rem Version 1.0 Beta
Rem 04.04.2008 JK created and tested on Win 2000, XP, Vista
Rem 16.06.2008 JK just version number updated


echo This program will install the ADwin-Software with minimal user interaction
Rem  --------------------------------------------------------------------------
echo.
echo                    (Remark: It is designed for Win 2000, XP, Vista
echo                             NOT suitable for Win 9x, ME )
Rem  ------------------------------------------------------------------
echo.
echo.
echo Important : You need to be "Administrator" 
echo             or a member of the Administrators' group.
Rem  -----------------------------------------------------
echo.
echo.
echo Important : Microsoft (R) .NET Framework 2.0 is required.
Rem  ---------------------------------------------------------
echo.
echo.

set /p Cancel_question=Hit any key to continue    or    press "c" (Return) to cancel :   
echo.
if x%Cancel_question%==xc goto END_CANCELLED
echo.


echo Have you already accepted the license agreement for the ADwin-Software ?
Rem  ------------------------------------------------------------------------
echo.
echo If yes, hit any key to continue    
echo.
set /p Cancel_question=If no, press "c" (Return) to cancel :   
echo.
if x%Cancel_question%==xc goto END_CANCELLED
echo.


echo Deinstalling the existing version(s)
Rem  ------------------------------------
Rem "ADwin-Developer-Software"
    msiexec.exe /passive /x {8C3F82BA-4739-4401-A926-D4BBEDD66588}
Rem msiexec.exe /qn      /x {8C3F82BA-4739-4401-A926-D4BBEDD66588}

Rem "ADwin-Driver and ADbasic" or "ADwin-Software"
    msiexec.exe /passive /x {3C56F3CD-AC88-4FDB-A09D-D493AD8FCCAB}
Rem msiexec.exe /qn      /x {3C56F3CD-AC88-4FDB-A09D-D493AD8FCCAB}
echo.


echo Installing the new version   (Please wait ...)
Rem  ----------------------------------------------
    Setup\ADwin-Software_5.00.02.00.exe /s /v/qb!
Rem Setup\ADwin-Software_5.00.02.00.exe /s /v/qn

Rem alternatively :     with logging to the file msi.log
REM Setup\ADwin-Software_5.00.02.00.exe /s /v/qb! /l*v+ c:\msi.log
REM Setup\ADwin-Software_5.00.02.00.exe /s /v/qn /l*v+ c:\msi.log

echo.
echo Finished
Rem  --------
echo.

pause

Rem If the installation should run completely "silent" (no displaying of windows)
Rem then the options /passive and /qb!  should be replaced by the option /qn

:END_CANCELLED
