System path environment variable / truncated path

G

Guest

In my system environment variables the "path" is set to %SystemRoot%\system32;%SystemRoot% immediately followed by a series of user defined paths at the end.

The problem is that when I call certain batch files from old Cobol EXEs, the path seems to get truncated (i echoed the path to a text file during the code run). The batch file also is losing sight of the \winnt\system32 directory, eventhough it is the first value within the "path" variable.

There is no path set in the autoexec.nt / autoexec.bat, and even when I tried different permutations using these with the path in the environment variable it didn't make any difference.

Moving the %SystemRoot%\system32;%SystemRoot% to the end of the system variable (i.e. after the user defined path rather than at the beginning) seems to relocate the system directories, but the path is still being truncated.

Can somebody tell me can the system environment variable be extended / is this a known problem / what is happening etc?

Thanks
Mike
 
R

Ray at

Have you lost your first post about this from a couple of hours ago? It's
out there still, with at least one reply.

Ray at work

Mike O'Neill said:
In my system environment variables the "path" is set to
%SystemRoot%\system32;%SystemRoot% immediately followed by a series of user
defined paths at the end.
The problem is that when I call certain batch files from old Cobol EXEs,
the path seems to get truncated (i echoed the path to a text file during the
code run). The batch file also is losing sight of the \winnt\system32
directory, eventhough it is the first value within the "path" variable.
There is no path set in the autoexec.nt / autoexec.bat, and even when I
tried different permutations using these with the path in the environment
variable it didn't make any difference.
Moving the %SystemRoot%\system32;%SystemRoot% to the end of the system
variable (i.e. after the user defined path rather than at the beginning)
seems to relocate the system directories, but the path is still being
truncated.
Can somebody tell me can the system environment variable be extended / is
this a known problem / what is happening etc?
 
E

Ed Maddox

Old DOS programs are limitted to I believe 128 characters
(including semi-colons) in the DOS path statement. SO try
relocating the dos programs to a folder off the root and
updating the path. Work with the path statement and
software installed (reinstalling to folders off the root)
until you get your path statement number of characters
down to less than 128.

Ed

-----Original Message-----
In my system environment variables the "path" is set to %
SystemRoot%\system32;%SystemRoot% immediately followed by
a series of user defined paths at the end.
The problem is that when I call certain batch files from
old Cobol EXEs, the path seems to get truncated (i echoed
the path to a text file during the code run). The batch
file also is losing sight of the \winnt\system32
directory, eventhough it is the first value within
the "path" variable.
There is no path set in the autoexec.nt / autoexec.bat,
and even when I tried different permutations using these
with the path in the environment variable it didn't make
any difference.
Moving the %SystemRoot%\system32;%SystemRoot% to the end
of the system variable (i.e. after the user defined path
rather than at the beginning) seems to relocate the system
directories, but the path is still being truncated.
Can somebody tell me can the system environment variable
be extended / is this a known problem / what is happening
etc?
 
C

corey

put the path itmes you need at the begining of the path
statement, anything over 256 characters cannot be seen by
your program.
-----Original Message-----
In my system environment variables the "path" is set to %
SystemRoot%\system32;%SystemRoot% immediately followed by
a series of user defined paths at the end.
The problem is that when I call certain batch files from
old Cobol EXEs, the path seems to get truncated (i echoed
the path to a text file during the code run). The batch
file also is losing sight of the \winnt\system32
directory, eventhough it is the first value within
the "path" variable.
There is no path set in the autoexec.nt / autoexec.bat,
and even when I tried different permutations using these
with the path in the environment variable it didn't make
any difference.
Moving the %SystemRoot%\system32;%SystemRoot% to the end
of the system variable (i.e. after the user defined path
rather than at the beginning) seems to relocate the system
directories, but the path is still being truncated.
Can somebody tell me can the system environment variable
be extended / is this a known problem / what is happening
etc?
 
T

Torgeir Bakken (MVP)

corey said:
put the path itmes you need at the begining of the path
statement, anything over 256 characters cannot be seen by
your program.

Hi

A 32-bits program should be able to handle the full path length of 1023
characters.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top