Strange handling of a .BAT file

Jul 26, 2008
14
0
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
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
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
12,340
149
> 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
 
May 20, 2008
11,388
99
Syracuse, NY, USA
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
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
 
Similar threads
Thread starter Title Forum Replies Date
forbin Strange handling of [nonbright] magenta background (v22) Support 2
R strange bug? Support 7
Jesse Heines Strange Line Wrapping Behavior Support 14
F strange results Support 9
M Strange error messages from TCC in FTP copy Support 7
M Another possibly strange remote registry issue Support 5
N Fixed Strange dir behavior Support 6
vefatica REGDIR, strange error message Support 7
T WAD Strange Unexpected "features" in the Debugger Support 2
P Strange mouse behavior with list Support 2
vefatica Strange tcc.exception.log Support 7
vefatica A strange one Support 0
D Strange DO behavior with /O Support 5
Glenn Bowes Strange text at startup Support 5
Steve Pitts WAD Strange output from DEL of a non-existent directory Support 7
vefatica Big numbers, strange errors Support 1
aedthuio Strange... lpksetup Support 4
CWBillow dir /4 strange Support 2
D Strange issue with FOR loop Support 15
MikeBaas Strange prob with %@replace.. Support 4
vefatica OT: strange files in %TEMP Support 10
Dan Glynhampton Documentation v15 help: Strange links in @INT topic Support 0
R WAD Strange output from "memory" command Support 1
M Yet another strange something re something called "@TCONVERT" Support 8
Roedy How to? Strange colours Support 9
M WAD Strange "Start" misbehavior... Support 10
vefatica Very strange console font corruption Support 3
Steve Pitts Strange problem with FREE Support 10
A strange error in alias Support 9
newgeekorder Debugger IDE - strange tab and parameter behaviour Support 1
Exolon Strange Prompt. Support 6
vefatica Strange folders Support 1
T Strange CPU value Support 3
J Strange error: unset /s Support 14
M Strange behavior... Support 2
CWBillow Strange happenings Support 2
vefatica Strange behavior reloading SHRALIAS sav files. Support 1
J ASSOC / FTYPE strange error message Support 3
D Strange crashes in @CRC32 and @MD5 Support 9
Charles Dye Strange output, here-doc redirection, TYPE, //UnicodeOutput=Yes Support 6
S Strange CHKDSK behavior Support 6
vefatica Strange results with CP 1252 Support 12
S Strange REN problem - non-English characters Support 3
dcantor Strange status in ACTIVATE command Support 0
vefatica WAD TCC: inconsistent character handling Support 11
M Handling of %~I problem Support 4
J File explorer handling from command line? Support 2
T WAD Difference between TCC and CMD in handling multi-command lines Support 6
thorntonpg Handling files with embedded spaces Support 1
J junction copy/move handling Support 6

Similar threads