4
Vote

SPSReport doesn't like to be installed to a directory with spaces.

description

SPSReport doesn't work if it's installed to a directory with spaces.
 
Reproduction:
1) Install SPSReport to C:\Program Files\SPSReport. The Setup prompts to execute the application, and asks you for your MOSS version. It immediately reports that it's finished successfully.
 
2) open a CMD prompt, change directory to C:\Program Files\SPSRpeort\Portal\Bin.
Execute 2007.CMD or SPSReport.CMD.
Both will fail with many "Path not found" issues.
 
Diagnosis:
It appears that in the RunOpts section, setting the SPS_TOOL_ROOT_DIR doesn't add spaces. Whenever the CMD files execute an EXE or call a CMD, the path to the EXE or CMD doesn't include necessary quotes.
 
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:RunOpts - set run options
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Determine the type of report that is being generated. This will form the cab file name
::
if not defined SPS_TOOL_ROOT_DIR set SPS_TOOL_ROOT_DIR=%CD:~0,-11%
 
 
Solution:
I believe that the RunOpts section in SPSRpt could be changed to include quotes:
 
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:RunOpts - set run options
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Determine the type of report that is being generated. This will form the cab file name
::
if not defined SPS_TOOL_ROOT_DIR set SPS_TOOL_ROOT_DIR=%CD:~0,-11%
set SPS_TOOL_DATA_DIR="%SPS_TOOL_ROOT_DIR%\%SPS_TOOL_SPECIALTY%"
set SPS_TOOL_BIN_DIR="%SPS_TOOL_DATA_DIR%\bin"
set SPS_TOOL_RPT_DIR="%SPS_TOOL_DATA_DIR%\rpt"
set SPS_TOOL_CAB_DIR="%SPS_TOOL_RPT_DIR%\cab"
set SPS_TOOL_DOC_DIR="%SPS_TOOL_DATA_DIR%\doc"
if not exist %SPS_TOOL_CAB_DIR% md %SPS_TOOL_CAB_DIR%
cd /d %SPS_TOOL_RPT_DIR%
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 
 
 
2007.cmd and 2003.cmd need their "Define global strings" section changed:
 
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: Define global strings
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
setlocal
set SPS_TOOL_NAME=Microsoft Platform Support Reporting Tool
rem Version string format = MajorVer.MinorVer.BuildMajorVer.BuildMinorVer
set SPS_TOOL_VERSION_NUM=V3.0.0.8
set SPS_TOOL_SPECIALTY=Portal
set SPS_TOOL_EVENTID_START=500
set SPS_TOOL_EVENTID_STOP=501
 
set SPSReports=%Systemroot%\SPSReports
if not defined SPS_TOOL_ROOT_DIR set SPS_TOOL_ROOT_DIR=%Systemroot%\SPSReports
if /i %PROCESSOR_ARCHITECTURE% == x86 set ProcArc=x86
if /i %PROCESSOR_ARCHITECTURE% == IA64 set ProcArc=IA64
if "%PROCESSOR_ARCHITEW6432%" == "" (
set ProcArc=%PROCESSOR_ARCHITECTURE%
) else (
set ProcArc=%PROCESSOR_ARCHITEW6432%
)
 
set SPS_TOOL_DATA_DIR="%SPS_TOOL_ROOT_DIR%\%SPS_TOOL_SPECIALTY%"
set SPS_TOOL_BIN_DIR="%SPS_TOOL_DATA_DIR%\bin"
set SPS_TOOL_RPT_DIR="%SPS_TOOL_DATA_DIR%\rpt"
set SPS_TOOL_CAB_DIR="%SPS_TOOL_RPT_DIR%\cab"
set SPS_TOOL_DOC_DIR="%SPS_TOOL_DATA_DIR%\doc"
if not exist %SPS_TOOL_CAB_DIR% md %SPS_TOOL_CAB_DIR%
DEL /F /Q %SPS_TOOL_RPT_DIR%*.* > nul
cd /d %SPS_TOOL_RPT_DIR%
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

comments

ChristopherGLewis wrote Jan 29, 2008 at 7:18 PM

It actually appears that all the CMD files have this code block:

set SPS_TOOL_DATA_DIR=%SPS_TOOL_ROOT_DIR%\%SPS_TOOL_SPECIALTY%
set SPS_TOOL_BIN_DIR=%SPS_TOOL_DATA_DIR%\bin
set SPS_TOOL_RPT_DIR=%SPS_TOOL_DATA_DIR%\rpt
set SPS_TOOL_CAB_DIR=%SPS_TOOL_RPT_DIR%\cab
set SPS_TOOL_DOC_DIR=%SPS_TOOL_DATA_DIR%\doc
if not exist %SPS_TOOL_CAB_DIR% md %SPS_TOOL_CAB_DIR%

and would have to be altered in all the Get-*.CMD files.

wrote May 9, 2008 at 8:52 PM

wrote Nov 19, 2008 at 5:29 PM

shoes wrote Feb 1, 2010 at 3:57 PM

We have a policy that prohibits us from deploying to the C: drive as that is considered the System drive. We have created a "Program Files" folder on our F: drive which is where we deploy application software. So I deployed to F:\Program Files\SPSReport and encountered this same issue.

wrote Feb 1, 2010 at 3:58 PM

wrote Feb 13, 2013 at 11:54 PM