If I lpr the file from a two levels down folder and my History is on the third level down it will work, but if lpr from a third level down and my History is on the forth level down it will not work. See my batch script below.
Show the complete path to each command and file in your code.
Or
Add all paths to the the search path.
C:\>path
PATH=C:\Program Files\Windows Resource Kits\Tools\;C:\WINDOWS\system32;C:\WINDOW
S;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\;c:\bin;C:\WINDOWS;C:
\bin;C:\pctools;C:\tc;C:\tc\bin;C:\DOS;C:\GMKW;C:\MOUSE
C:\>echo %PATH%
C:\Program Files\Windows Resource Kits\Tools\;C:\WINDOWS\system32;C:\WINDOWS;C:\
WINDOWS\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\;c:\bin;C:\WINDOWS;C:\bin;
C:\pctools;C:\tc;C:\tc\bin;C:\DOS;C:\GMKW;C:\MOUSE
C:\>