Guys anyone know how to stop or close a running program remotely through a vb.net program? I am already aware on how to run or open one using the System.Diagnostics.Process.Start method. I would be needing it in my next project

Thanks

Recommended Answers

U want to stop the application which u ran using the process.start?

Jump to Post

I would imagine Process.Kill or Process.Close and if that fails you can always shell out to kill.exe or (if you download the free SysInternals suite) pskill.exe.

Jump to Post

All 8 Replies

U want to stop the application which u ran using the process.start?

Yes. I am just wondering if it's possible

I would imagine Process.Kill or Process.Close and if that fails you can always shell out to kill.exe or (if you download the free SysInternals suite) pskill.exe.

There is no .Kill or .Close methods under Process,

Are you associating the process by creating an instance to it? If yes you should be able to kill it.

Now I have the .kill method. I created an instance by;
Dim MyProcess as Process = New Process.

Then kill the process which u want.. What is the problem now?

actually, it works now. However, I am still having a problem when I am changing the value of the MyProcess.StartInfo.Filename. The error says: no process is associated with this object

What could be the problem

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.