Tech Support > Operating Systems > Windows 2000 > System path environment variable / truncated path
System path environment variable / truncated path
Posted by Mike O'Neill on November 6th, 2003


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

Posted by Ray at on November 6th, 2003


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" <anonymous@discussions.microsoft.com> wrote in message
news:F69C5E15-6379-4473-92C7-621FD2A81AB4@microsoft.com...
defined paths at the end.
code run). The batch file also is losing sight of the \winnt\system32
directory, eventhough it is the first value within the "path" variable.
variable it didn't make any difference.
seems to relocate the system directories, but the path is still being
truncated.


Posted by Pegasus \(MVP\) on November 6th, 2003


.. . . and for good measure he posted a third time a little later.


"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:umHaC7HpDHA.708@TK2MSFTNGP10.phx.gbl...


Posted by Ray at on November 6th, 2003


Sigh...

Ray at work

"Pegasus (MVP)" <I.can@fly.com> wrote in message
news:uA%23b5OKpDHA.688@TK2MSFTNGP10.phx.gbl...


Posted by Ed Maddox on November 19th, 2003


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


a series of user defined paths at the end.
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.
with the path in the environment variable it didn't make
any difference.
rather than at the beginning) seems to relocate the system
directories, but the path is still being truncated.
etc?

Posted by corey on November 26th, 2003


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

a series of user defined paths at the end.
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.
with the path in the environment variable it didn't make
any difference.
rather than at the beginning) seems to relocate the system
directories, but the path is still being truncated.
etc?

Posted by Torgeir Bakken (MVP) on November 26th, 2003


corey wrote:

Hi

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

--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter




Similar Posts