@Echo off

Echo Be sure the TRIX GUI is not running when executing this script.
Echo ---
pause

if empty%1 == empty goto NOREPOSITORY

goto NOERRORS

:NOREPOSITORY
echo ERROR: Enter the Repository name.
echo Example - CPQCLASSES TNG_REPOSITORY_MACHINE
goto end

:NOFILES
echo ERROR: Class definition files not present in the specified path.
goto end

:NOERRORS
Echo Importing the HP Class definitions
Echo ---
Echo Importing the HP Host root class
call trix /TYPE=IMPORT /FILE=HP_Host.TNG /R=%1
Echo Importing the HP Workstation root class
call trix /TYPE=IMPORT /FILE=HP_Workstation.TNG /R=%1
Echo Importing HP_RemoteInsight
call trix /TYPE=IMPORT /FILE=HP_RemoteInsight.TNG /R=%1
Echo Importing HP_TaskSmart
call trix /TYPE=IMPORT /FILE=HP_TaskSmart.TNG /R=%1
Echo Importing HP_SANworks
call trix /TYPE=IMPORT /FILE=HP_SANappliance.TNG /R=%1
Echo Importing HP_InsightManager
call trix /TYPE=IMPORT /FILE=HP_InsightManager.TNG /R=%1
Echo Importing HP_WindowsNT_Server
call trix /TYPE=IMPORT /FILE=HP_WindowsNT_Server.TNG /R=%1
Echo Importing HP_WindowsNT
call trix /TYPE=IMPORT /FILE=HP_WindowsNT.TNG /R=%1
Echo Importing HP_Windows2000_Server
call trix /TYPE=IMPORT /FILE=HP_Windows2000_Server.TNG /R=%1
Echo Importing HP_Windows_NetServer
call trix /TYPE=IMPORT /FILE=HP_Windows_NetServer.TNG /R=%1
Echo Importing HP_Windows2000
call trix /TYPE=IMPORT /FILE=HP_Windows2000.TNG /R=%1
Echo Importing HP_Windows95
call trix /TYPE=IMPORT /FILE=HP_Windows95.TNG /R=%1
Echo Importing HP_Windows9x
call trix /TYPE=IMPORT /FILE=HP_Windows9x.TNG /R=%1
Echo Importing HP_Novell
call trix /TYPE=IMPORT /FILE=HP_Novell.TNG /R=%1
Echo Importing HP_DECSystem
call trix /TYPE=IMPORT /FILE=HP_DECSystem.TNG /R=%1
Echo Importing HP_OS2
call trix /TYPE=IMPORT /FILE=HP_OS2.TNG /R=%1
Echo Importing HP_SCOUnix
call trix /TYPE=IMPORT /FILE=HP_SCOUnix.TNG /R=%1
Echo Importing HP_UnixWare
call trix /TYPE=IMPORT /FILE=HP_UnixWare.TNG /R=%1
Echo Importing HP_Linux
call trix /TYPE=IMPORT /FILE=HP_Linux.TNG /R=%1
Echo Importing HP_RackEnclosure
call trix /TYPE=IMPORT /FILE=HP_RackEnclosure.TNG /R=%1

Echo ---
Echo HP classes imported into the Common Object Repository
Echo The HP classes were created under TNGRoot-ManagedObject-Host-HP
Echo ---

call copy %CA_TND_HOME%\services\config\aws_wvgate\gwclass.dat %CA_TND_HOME%\services\config\aws_wvgate\gwclass.dat.bak

call copy %TNG_HOME%\services\config\aws_wvgate\gwclass.dat %TNG_HOME%\services\config\aws_wvgate\gwclass.dat.bak

Echo File gwclass.dat copied to gwclass.dat.bak

call hpgwedit.exe

:end
