@echo off

Echo -
Echo This script will remove all the HP integration files from the Unicenter NSM directory.
Echo However, it will not delete the cpqtnd directory.
Echo -
Echo Example: Uninstall.bat C:\TND
Echo -


if empty%1 == empty goto error_no_path

goto skip_error_handling

:error_no_path
echo ERROR: No Integration path detected in first argument.
goto end

:skip_error_handling

Echo Deleting HP Icons

call del %1\icons\cpq*.ico
call del %1\icons\cim*.ico
call del %1\icons\cpwwind*.ico
call del %1\icons\cpswind*.ico
call del %1\icons\cpcsvr*.ico
call del %1\icons\cpsnove*.ico
call del %1\icons\cpssco*.ico

Echo Deleting HP Unicenter Explorer Icons

call del %1\icons\wvclass\decal\cpq*.*
call del %1\icons\wvclass\large\cpq*.*
call del %1\icons\wvclass\large\insightmanager*.*
call del %1\icons\wvclass\small\cpq*.*
call del %1\icons\wvclass\small\insightmanager*.*

Echo Deleting HP Policy files

call del %1\config\abrowser\browser.insightmanager
call del %1\services\config\aws_nsm\dm\insightmanager.cnf
call del %1\services\config\aws_nsm\dm\insightmanager.dat

Echo Deleting HP Insight Agent Class Definition

call del %1\services\config\aws_wvgate\InsightManager.wvc

Echo Deleting HP MIBs

call del %1\services\config\mibs\cpq*.txt
call del %1\services\config\mibs\exclude\cpqrecovery.txt
call del %1\services\bin\install_cpqmibs.bat
call del %1\SCHEMA\INCLUDED\cpq*.txt
call del %1\SCHEMA\INCLUDED\ether.txt
call del %1\SCHEMA\INCLUDED\token.txt

Echo Deleting the executable files

call del %1\bin\cimxe.bat
call del %1\bin\hpim7.exe
call del %1\bin\hpim72.exe
call del %1\bin\hpqemc.exe
call del %1\bin\hpqweb.exe
call del %1\bin\hpqriloe.exe

Echo -
Echo To remove the InsightManager class and objects, execute hpqrmv.exe in the 
Echo cpqtnd\TOOLS directory.
Echo To remove the extended HP classes, execute hpqclassremove.exe in the 
Echo cpqtnd\cpqwv\CLASSES directory.
Echo -
