@echo off
call ov.envvars.bat
cls
set	LANG=C

echo -
echo This will remove the Web Jetadmin support from HP OpenView NNM.
echo -
echo OpenView BIN Directory is %OV_BIN%
echo OpenView BITMAPS Directory is %OV_BITMAPS%
echo OpenView SYMBOLS Directory is %OV_SYMBOLS%
echo OpenView CONF Directory is %OV_CONF%
echo OpenView REGISTRATION Directory is %OV_REGISTRATION%
echo OpenView LRF Directory is %OV_LRF%
echo OpenView HELP Directory is %OV_HELP%
echo OpenView FIELDS Directory is %OV_FIELDS%
echo OpenView Main Directory is %OV_MAIN_PATH%
echo OpenView WWW Directory is %OV_WWW%
echo OpenView WWW Registration Directory is %OV_WWW_REG%
echo -
echo LANG=C
Echo -
Echo Press any key to remove or CTRL-C to exit.
Echo -
pause

echo Removing the Web Jetadmin Files...
echo Removing the Web Jetadmin Files... 1>>"%OV_BIN%\ciminstall.log"
call del /q "%OV_REGISTRATION%\C\hpwjabridge.arf" 1>>"%OV_BIN%\ciminstall.log" 2>>"%OV_BIN%\cimerror.log"

echo Starting the OpenView database...
echo Starting the OpenView database... 1>>"%OV_BIN%\ciminstall.log"
ovstart ovwdb 1>>"%OV_BIN%\ciminstall.log" 2>>"%OV_BIN%\cimerror.log"

echo Reloading the application registration files...
echo Reloading the application registration files... 1>>"%OV_BIN%\ciminstall.log"
ovw -fields 1>>"%OV_BIN%\ciminstall.log" 2>>"%OV_BIN%\cimerror.log"

echo Removing the Web Jetadmin trap definitions...
echo Removing the Web Jetadmin trap definitions... 1>>"%OV_BIN%\ciminstall.log" 
@call remove-traps.cmd

echo Starting the OpenView services... 
echo Starting the OpenView services... 1>>"%OV_BIN%\ciminstall.log"
ovstart 1>>"%OV_BIN%\ciminstall.log" 2>>"%OV_BIN%\cimerror.log"

echo Done. 1>>"%OV_BIN%\ciminstall.log"

:end
