473,323 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Anything similar to C's "System()" function?


Hello,

I'm trying to call a program (and/or batch file) from a command line
from within a standalone VB.NET application - something I would have
done using the "System()" function if I was working in C.

The only way I've found so far is

System.Diagnostics.Process.Start("blah.exe in out")

(I'll be creating 'in' and processing 'out' from within my app).

Is this the best way to do it? Is there a way to suppress the DOS box
that briefly flashes up?

Thanks in advance for any advice,

Gary
Nov 21 '05 #1
2 1078
"beaker" <ra**************@rhubarbblahblah.net> schrieb:
I'm trying to call a program (and/or batch file) from a command line from
within a standalone VB.NET application - something I would have done using
the "System()" function if I was working in C.

The only way I've found so far is

System.Diagnostics.Process.Start("blah.exe in out")
Yes.
(I'll be creating 'in' and processing 'out' from within my app).

Is this the best way to do it? Is there a way to suppress the DOS box
that briefly flashes up?


You may want to check out the 'ProcessStartInfo' class and its 'WindowStyle'
and 'CreateNoWindow' properties. Maybe this solves your problem.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2
Herfried K. Wagner [MVP] wrote:
"beaker" <ra**************@rhubarbblahblah.net> schrieb:
I'm trying to call a program (and/or batch file) from a command line
from within a standalone VB.NET application - something I would have
done using the "System()" function if I was working in C.

The only way I've found so far is

System.Diagnostics.Process.Start("blah.exe in out")

Yes.
(I'll be creating 'in' and processing 'out' from within my app).

Is this the best way to do it? Is there a way to suppress the DOS box
that briefly flashes up?

You may want to check out the 'ProcessStartInfo' class and its
'WindowStyle' and 'CreateNoWindow' properties. Maybe this solves your
problem.


It did indeed solve my problem!

Thanks for the help.
Gary
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my...
1
by: Leila Y | last post by:
Dear Friends, I need to execute an executable file (*.exe) within visual c++ program. I have used " system function " for this purpose and it works in most of the time but sometimes while...
11
by: T O | last post by:
Hi all, I am very new to C programming and have come across problem. My programme has opened and created a text document on the hard drive. The document name is stored in a string called...
21
by: Neel | last post by:
I am trying to "ping" a remote host in my C++/Redhat Linux code to check whether that host is connected or not. if (0 == system("ping -w 2 192.168.0.2)) But, in both cases...
16
by: BHARAT MEHTA | last post by:
Hi Guys, I am little new to C. I wish to know the way to use the 'system' function. I mean I know that the function is used to run an external DOS command but every time I use it it returns -1...
11
by: jobs239 | last post by:
Can I use this line inside C program "system(java -jar <jarfilename>)" to run a java program from C? Or do I have to use some JNI interface.?
4
by: Chris Botha | last post by:
The customer has a database with a column in a table named "System". I've been using this method for years now - create a dataset (an .xsd file) for the table. With a column named "System" in the...
3
by: aki | last post by:
Hello , i want to use system commnad in my code to delete files in specified manner. but this way i am not able to delete files. Can somebody answer . i tried with this as following ,...
4
by: sebastien.willemijns | last post by:
hello, i use a small PHP script to grab DNS infos at http://80.247.230.136/bug/php/ (php and txt available) the trouble is the last line of every output given by "system" function is always...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.