Having Trouble with Shell in VB 
Author Message
 Having Trouble with Shell in VB

I am trying to execute a batch program from the command prompt in VB.NET.  I
have tried both Shell and System.Diagnostics.Process and neither one have
worked for me.  Both of them pop open the cmd window and I can see the batch
file in the cmd window but then the command window closes before the program
will execute.  I have even added the wait parameters but that doesn't hold
off the window.  So any help would be appreciated.  And the reason I am even
running the batch file is that I tried running the program with the
parameters thru Shell and Process but I couldn't get that to work so I put
it into a batch file.  The batch file will run on it's own but not thru
shell and process.


Fri, 28 Jan 2005 22:07:34 GMT  
 Having Trouble with Shell in VB
Have you tried putting a pause command into the batch file to ensure that
it's not the batch file erroring out?

Other than that, can you post the code that you used in your attempts to
execute the file.

Cheers

--
Robert Chapman
Manager, Applications Development
prairieFyre Software Inc.
http://www.prairiefyre.com

Quote:
> I am trying to execute a batch program from the command prompt in VB.NET.
I
> have tried both Shell and System.Diagnostics.Process and neither one have
> worked for me.  Both of them pop open the cmd window and I can see the
batch
> file in the cmd window but then the command window closes before the
program
> will execute.  I have even added the wait parameters but that doesn't hold
> off the window.  So any help would be appreciated.  And the reason I am
even
> running the batch file is that I tried running the program with the
> parameters thru Shell and Process but I couldn't get that to work so I put
> it into a batch file.  The batch file will run on it's own but not thru
> shell and process.



Fri, 28 Jan 2005 22:13:50 GMT  
 Having Trouble with Shell in VB
Thanks.  That was my problem.  I should of thought of that already.  The
window was closing so fast that I couldn't see the error.  Thank you again.

Quote:
> Have you tried putting a pause command into the batch file to ensure that
> it's not the batch file erroring out?

> Other than that, can you post the code that you used in your attempts to
> execute the file.

> Cheers

> --
> Robert Chapman
> Manager, Applications Development
> prairieFyre Software Inc.
> http://www.prairiefyre.com


> > I am trying to execute a batch program from the command prompt in
VB.NET.
> I
> > have tried both Shell and System.Diagnostics.Process and neither one
have
> > worked for me.  Both of them pop open the cmd window and I can see the
> batch
> > file in the cmd window but then the command window closes before the
> program
> > will execute.  I have even added the wait parameters but that doesn't
hold
> > off the window.  So any help would be appreciated.  And the reason I am
> even
> > running the batch file is that I tried running the program with the
> > parameters thru Shell and Process but I couldn't get that to work so I
put
> > it into a batch file.  The batch file will run on it's own but not thru
> > shell and process.



Fri, 28 Jan 2005 22:20:43 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. VB Internet control : having trouble with Proxy server

2. Having trouble converting SQL Server encrypted field in VB code

3. Trouble With Shell in VB Web project

4. Newbie having trouble with VBA Code in Access

5. Having Trouble populating an array from table values

6. getting reference path errors, having trouble fixing.

7. Having trouble programatically switching between fax and pdf report output

8. Having Trouble w/Data Validation Code (Acc97)

9. Having trouble with the TransferDatabase method

10. Still having trouble....

11. Having trouble sending multiple emails using outlook object

12. Having trouble getting the Alias (Account) field data from a global address

 

 
Powered by phpBB® Forum Software