System environment variable / truncated path

G

Guest

In my system environment variables the "path" is set to the 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 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
 
P

Pegasus \(MVP\)

- What command processor do you use when invoking
your Cobol programs?
- What path do you see when you do this:
Start / Run / cmd {OK}
Type path


M'O'Neill said:
In my system environment variables the "path" is set to the 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 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?
 
G

Guest

- What command processor do you use when invoking
your Cobol programs?

To start my code i call the batch file from an icon that i setup on the desktop. This batch file then calls an exe which in turn calls another batch file. This is the batch file that encounters the truncated path.

- What path do you see when you do this:
Start / Run / cmd {OK}
Type path

When I check the prompt from the cmd prompt, I can see the full path correctly. Also, when I run the batch file manually at this prompt it works fine. It is when it is called via the EXE that the truncation / losing the system directory seems to happen.
 
P

Pegasus \(MVP\)

There appears to be a contradiction in your first post. First you say
- the "path" is set to the SystemRoot
hence path=c:\winnt

Then you say:
- \winnt\system32 <snip> is the first value within the "path" variable.

Please quote your exact path to resolve this contradiction. Use
cut & paste techniques to avoid transcription errors.

M'O'Neill said:
- What command processor do you use when invoking
your Cobol programs?

To start my code i call the batch file from an icon that i setup on the
desktop. This batch file then calls an exe which in turn calls another batch
file. This is the batch file that encounters the truncated path.
- What path do you see when you do this:
Start / Run / cmd {OK}
Type path

When I check the prompt from the cmd prompt, I can see the full path
correctly. Also, when I run the batch file manually at this prompt it works
fine. It is when it is called via the EXE that the truncation / losing the
system directory seems to happen.
 
G

Guest

sorry...I will post the precise details once I have access to the machine again on monday (it is offsite and i have no access at the moment)
thanks
 

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