[AccessD] A2003:Shell opens 2 DOS windows

Jim Lawrence accessd at shaw.ca
Mon Jan 8 18:19:06 CST 2007


Hi Darren:

This is an old suggestion from the DOS days but I was wondering if the batch
file needed a carriage return to start it running. 

The old method worked something as follows:
Given your batch file name is Darren.bat then a file named return.txt would
be created.

First create a txt file named return.txt with one letter/number in it, like
a capital 'A' and save it. Then edit the file using the DOS debug command:

'Debug return.txt', at the command prompt and edit the 'A' now shown as hex
'41' to a Return hex value of '0D'. Then save the return.txt file and exit.

Now the return.txt file can be used as a Return value provider, at the
command prompt like:

Darren.bat < return.txt

The previous is a simple sample but very complex value provider files can be
created as well
 
HTH
Jim

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darren DICK
Sent: Monday, January 08, 2007 3:40 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] A2003:Shell opens 2 DOS windows

Hi Stuart

The batch file works fine if I double click it by the way 
Just not if I issue the Shell Command to it from Access

- the batch file and its path are not the issue - I don't think

>> What are in strFileName and the batch file?

String File name is the path to the batch file - it is all cool

Again - the batch file works fine and as desired if double clicked but not
when
Shelled to by Access

The batch file is full of repetitive lines like... 

(xml_creation.rb is a Ruby App we wrote ourselves)

xml_creation.rb -t TA -a sqlserver  -h SERVERNAMEHERE -d DBNamehere-u sa -p
PASSWORDHERE -i 10113
xml_creation.rb -t TA -a sqlserver  -h SERVERNAMEHERE -d DBNamehere-u sa -p
PASSWORDHERE -i 10114
xml_creation.rb -t TA -a sqlserver  -h SERVERNAMEHERE -d DBNamehere-u sa -p
PASSWORDHERE -i 10115
xml_creation.rb -t TA -a sqlserver  -h SERVERNAMEHERE -d DBNamehere-u sa -p
PASSWORDHERE -i 10116
xml_creation.rb -t TA -a sqlserver  -h SERVERNAMEHERE -d DBNamehere-u sa -p
PASSWORDHERE -i 10117
xml_creation.rb -t TA -a sqlserver  -h SERVERNAMEHERE -d DBNamehere-u sa -p
PASSWORDHERE -i 10118
xml_creation.rb -t TA -a sqlserver  -h SERVERNAMEHERE -d DBNamehere-u sa -p
PASSWORDHERE -i 10119
xml_creation.rb -t TA -a sqlserver  -h SERVERNAMEHERE -d DBNamehere-u sa -p
PASSWORDHERE -i 10120
xml_creation.rb -t TA -a sqlserver  -h SERVERNAMEHERE -d DBNamehere-u sa -p
PASSWORDHERE -i 10121
xml_creation.rb -t TA -a sqlserver  -h SERVERNAMEHERE -d DBNamehere-u sa -p
PASSWORDHERE -i 10122
xml_creation.rb -t TA -a sqlserver  -h SERVERNAMEHERE -d DBNamehere-u sa -p
PASSWORDHERE -i 10123
echo **10123 done**
xml_creation.rb -t TA -a sqlserver  -h SERVERNAMEHERE -d DBNamehere-u sa -p
PASSWORDHERE -i 10124

Many thanks
 
Have a great day
 
Darren
------------------
T: 0424 696 433

-----Original Message-----
From: Stuart McLachlan [mailto:stuart at lexacorp.com.pg] 
Sent: Monday, 8 January 2007 8:48 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] A2003:Shell opens 2 DOS windows

Wjhat are in strFileName and the batch file?

On 8 Jan 2007 at 8:35, Darren DICK wrote:

> I use the line below to open and 'run' a batch file
> 
> Call Shell(strFileName)
> 
> Can anyone tell me why 2 dos (Command) windows open?
> 
> The syntax is valid - everything is cool - but 2 of them open up and then
> start trying to process the lines in the batch file
> 
> And no. There is not some second call buried elsewhere in the code
-- 
Stuart


-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list