Strange handling of a .BAT file

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Jul 26, 2008
14
0
#1
Hi Guys,
Windows XP SP2 TCC 11.00.48
I have a Windows application that calls a batch file. It is shelling to TCC.
The .bat file is in d:\App\source. However when it runs the correct results do not occur. If I put a DIR into the .bat file it shows it is running in d:\

If I run the .bat file under CMD it works fine.

Any thoughts or suggestions appreciated.

Regards,

Ian
 
Apr 1, 2010
43
0
#2
Hi Guys,
Windows XP SP2 TCC 11.00.48
I have a Windows application that calls a batch file. It is shelling to TCC.
The .bat file is in d:\App\source. However when it runs the correct results do not occur. If I put a DIR into the .bat file it shows it is running in d:\

If I run the .bat file under CMD it works fine.

Any thoughts or suggestions appreciated.

Regards,

Ian
Please post the content of that batch file.
 
Jul 26, 2008
14
0
#3
Please post the content of that batch file.
This is it in part. It just repeats for different .dpk files

"C:\Program Files\Embarcadero\RAD Studio\7.0\bin\DCC32.EXE" esbpcs_base_dt_d14.dpk -B -N"d:\ESBPCS5\d14" -LE"d:\ESBPCS5\d14" -LN"d:\ESBPCS5\d14" -U"d:\ESBPCS5\d14" -$A+B-C-D-H+I-J-L-M-N+O+P+Q-R-S-T-U-V+W-X+Y-
"C:\Program Files\Embarcadero\RAD Studio\7.0\bin\DCC32.EXE" esbpcs_base_db_rt_d14.dpk -B -N"d:\ESBPCS5\d14" -LE"d:\ESBPCS5\d14" -LN"d:\ESBPCS5\d14" -U"d:\ESBPCS5\d14" -$A+B-C-D-H+I-J-L-M-N+O+P+Q-R-S-T-U-V+W-X+Y-
"C:\Program Files\Embarcadero\RAD Studio\7.0\bin\DCC32.EXE" esbpcs_base_db_dt_d14.dpk -B -N"d:\ESBPCS5\d14" -LE"d:\ESBPCS5\d14" -LN"d:\ESBPCS5\d14" -U"d:\ESBPCS5\d14" -$A+B-C-D-H+I-J-L-M-N+O+P+Q-R-S-T-U-V+W-X+Y-

Ian
 

rconn

Administrator
Staff member
May 14, 2008
10,101
85
#4
> Windows XP SP2 TCC 11.00.48
> I have a Windows application that calls a batch file. It is shelling
> to TCC.
> The .bat file is in d:\App\source. However when it runs the correct
> results do not occur. If I put a DIR into the .bat file it shows it is
> running in d:\
>
> If I run the .bat file under CMD it works fine.
Do you have a TCSTART file that is changing your current directory?

Rex Conn
JP Software
 
#5
On Wed, 28 Apr 2010 04:37:33 -0400, branch <> wrote:

|Hi Guys,
|Windows XP SP2 TCC 11.00.48
|I have a Windows application that calls a batch file. It is shelling to TCC.
|The .bat file is in d:\App\source. However when it runs the correct results do not occur. If I put a DIR into the .bat file it shows it is running in d:\
|
|If I run the .bat file under CMD it works fine.

If an app runs TCC, TCC (when it starts) will have the current durectory
specified by that app, the default being that app's own current directory.
That's how Windows works. Where the batch file **is** doesn't matter at all.
Either the app is telling TCC to start in d:\ or TCC is changing to d:\ after
starting because of something in a TCSTART file.
--
- Vince
 
Jul 26, 2008
14
0
#6
Do you have a TCSTART file that is changing your current directory?

Bingo! there was a 'cd\' as the second last line in TCStart. Don't know why I put it in there to start with but it has been there for a long time.

Took it out and all working OK now.

Thanks to all for your assistance.

Ian