@echo off
If .%1==.-I Goto Install
If .%1==.-U Goto Uninstall

@echo Use one of the following parameters
@echo -I for Installation
@echo -U for Uninstall

Goto END

:Install
@echo Starting the Installation....
setup.exe /S
if errorlevel 1 goto notfinal
goto FINAL

:Uninstall
@echo Starting the uninstallation....
setup.exe /S /REMOVE=ALL
if errorlevel 1 goto notfinal

:FINAL
@echo Operation completed
goto END

:NOTFINAL
if errorlevel 4 SET NOTE="NOTE: This installer contains no driver for the system's OS"
if errorlevel 5 SET NOTE="NOTE: Installer must be run with Admin privileges. Change Login or use Run As when invoking this installer"
if errorlevel 6 SET NOTE="NOTE: The same version is already installed.To reinstall the driver, you must uninstall the installed one first."
if errorlevel 7 SET NOTE="NOTE: The installed version is newer.To install this driver instead, you must uninstall the installed one first."
if errorlevel 8 SET NOTE="NOTE: NOTE:ASF installed. To install this driver, you must uninstall ASF first."
if errorlevel 9 SET NOTE="NOTE: Another version of the software is installed. Please uninstall this software first"

@echo WARNING:Operation not completed successfully
@echo %NOTE%

:END

