MSITex.cmd - small bug

pviton's picture

There's a minor bug in MSITex.cmd, in the part that sets up
the location for Inkscape. On Win7, the IF part
always reports true. As it happens, if the user has installed
Inkscape to SWP6's default location, this will be correct, but
you don't want to rely on this in general.

To see this, put the following in a cmd file and run it:

@echo off
if EXIST %programfiles(x86)%\JInkscape (
echo %programfiles(x86)%\JInkscape Exists in x86
) ELSE (
if EXIST %programfiles%\JInkscape (echo %programfiles%\JInkscape exists)
)

The fix is to quote the file location. The cmd file

@echo off
if EXIST "%programfiles(x86)%\JInkscape" (
echo "%programfiles(x86)%\JInkscape" Exists in x86
) ELSE (
if EXIST "%programfiles%\JInkscape" (echo "%programfiles%\JInkscape" exists)
)

should report nothing.