@echo off
REM ------------------------------------------------------------------------------------------------------------
REM
REM Hewlett Packard Services Reporting Tool Enhanced
REM
REM ------------------------------------------------------------------------------------------------------------
REM 8-05-13
REM
REM [HPS Report version to be deployed]
REM ------------------------------------------------------------------------------------------------------------
Set HPSver=9.2.00
REM
REM
REM [Script to execute the correct version of HPSreports according to the architecture of the system]
REM ------------------------------------------------------------------------------------------------------------
REM TMP modified to workaround issue seen on NAS systems where 8.3 file name creation is disabled
If not exist %TMP% (
	If exist "%TMP%" (set TMP="%TMP%") > nul 2>>&1
)
If not exist %TMP% (
	If not exist %SystemDrive%\temp (Mkdir %SystemDrive%\temp)
	set TMP=%SystemDrive%\temp
)

If /i "%PROCESSOR_ARCHITECTURE%" EQU "AMD64" (set ProcArc=x64) Else (set ProcArc=%PROCESSOR_ARCHITECTURE%)

If "%PROCESSOR_ARCHITEW6432%" NEQ "" (
	If /i "%PROCESSOR_ARCHITEW6432%" EQU "AMD64" (set ProcArc=x64) Else (set ProcArc=%PROCESSOR_ARCHITEW6432%)
)

start /B .\HPSRPT_Enhanced_v%HPSver%-%ProcArc%.EXE /q /c:"hpsrpt.cmd /f /all /q"
REM ------------------------------------------------------------------------------------------------------------
