473,503 Members | 241 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using the process class

Im trying to start another application from within my vb.net program using
the process class. i want to start it, capture the stdout and stderr and
print them to a textbox.
I get something when i run ipconfig, but nothing when i run the command to
start nasm.

heres what it looks like:

Dim myProcessStartInfo As New ProcessStartInfo("nasm.exe") 'this is
the correct command
myProcessStartInfo.Arguments = "-h" 'just
want to print out the help
myProcessStartInfo.UseShellExecute = False
myProcessStartInfo.RedirectStandardOutput = True
myProcess.StartInfo = myProcessStartInfo
myProcess.Start()
TextBox1.Text = myProcess.StandardOutput.ReadToEnd

like i said, if i run ipconfig, it works great...but anything else produces
nothing.
I've stepped through it, and im getting an empty string... bu t when i do
the same thing in the command window, im getting the correct info.
i have tried it with redirecting stderr, with the same result.
any ideas?

thanks
patrick
Jul 17 '05 #1
1 3150
nevermind...got it

"rigamonk" <ri********@hotSPAMmail.com> wrote in message
news:LO********************@giganews.com...
Im trying to start another application from within my vb.net program using
the process class. i want to start it, capture the stdout and stderr and
print them to a textbox.
I get something when i run ipconfig, but nothing when i run the command to
start nasm.

heres what it looks like:

Dim myProcessStartInfo As New ProcessStartInfo("nasm.exe") 'this
is the correct command
myProcessStartInfo.Arguments = "-h" 'just
want to print out the help
myProcessStartInfo.UseShellExecute = False
myProcessStartInfo.RedirectStandardOutput = True
myProcess.StartInfo = myProcessStartInfo
myProcess.Start()
TextBox1.Text = myProcess.StandardOutput.ReadToEnd

like i said, if i run ipconfig, it works great...but anything else
produces nothing.
I've stepped through it, and im getting an empty string... bu t when i do
the same thing in the command window, im getting the correct info.
i have tried it with redirecting stderr, with the same result.
any ideas?

thanks
patrick

Jul 17 '05 #2

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

Similar topics

28
20272
by: Daniel | last post by:
Hello =) I have an object which contains a method that should execute every x ms. I can use setInterval inside the object construct like this - self.setInterval('ObjectName.methodName()',...
0
8338
by: grutta | last post by:
I am writing a windows service that will recieve notification when a USB Device is insterted into the machine. I have used the RegisterDeviceNotification and the RegisterServiceCtrlHandlerEx with...
2
1605
by: Shawn Hogan | last post by:
I'm trying to open an instance of the default browser and browse to a URL. I'm seeing an issue with the process class where if i execute my process using this code Dim p As Process = New Process...
0
5201
by: Reed | last post by:
Can someone stear me in the right direction to convert a binary tree from a Linked List to a Dynamic Array... Dynamic arrays aren't something im strong with. //********bintree.h******** #ifndef...
2
9196
by: Kent Lewandowski | last post by:
hi all, Recently I wrote some stored procedures using java jdbc code (admittedly my first stab) and then tried to implement the same within java packages (for code reuse). I encountered...
11
6551
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
9
10858
by: Ben Dewey | last post by:
Project: ---------------------------- I am creating a HTTPS File Transfer App using ASP.NET and C#. I am utilizing ActiveDirectory and windows security to manage the permissions. Why reinvent...
3
5311
by: Rob | last post by:
Hi all, I am having trouble converting the code below (found on http://vbnet.mvps.org/index.html?code/core/sendmessage.htm) into a format that will work using vb .NET. Can anyone have a look...
6
17139
by: ransoma22 | last post by:
I developing an application that receive SMS from a connected GSM handphone, e.g Siemens M55, Nokia 6230,etc through the data cable. The application(VB.NET) will receive the SMS automatically,...
12
2179
by: Joe | last post by:
Hello All: Do I have to use the LoadControl method of the Page to load a UserControl? I have a class which contains three methods (one public and two private). The class acts as a control...
0
7203
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7282
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6995
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5581
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4678
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3157
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
738
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.