@SETLOCAL @echo off ::make sure the start dir is the same as where the batch file locates SET batchDir=%~dp0 CD /D %batchDir% @IF "%1" == "" GOTO usage @IF "%1" == "install" GOTO in @IF "%1" == "uninstall" GOTO unin :in CD hapi hapint -k SPHAPIDA5 -p %SystemRoot%\hapint.exe -q goto end :unin CD hapi hapint -k SPHAPIDA5 -r -q goto end @GOTO end :usage @ECHO Usage: @ECHO To Install hapinst install @ECHO To Uninstall hapinst uninstall :end @POPD @ENDLOCAL