Question:
How to kill a hidden VB.Net process?
Wes10
2011-07-15 17:49:47 UTC
Hi,

My application starts a console application with the Shell command using the AppWinStyle.Hide attribute. Now my problem is that the normal commands which are used to kill a process doesn't work with this one as the window is hidden.

Is there any alternative way to kill a process that has been started in VB.net with AppWinStyle.Hide?

Thanks!
Three answers:
anonymous
2011-07-15 17:57:21 UTC
Go into the Task Manager and then the Processes tab. Find the process that runs VB and end it.



If I misunderstood and you can't do that, then restart your computer =)



Hope this helps!

If you need further assistance/advice, feel free to contact me.
Gardner
2011-07-15 17:56:32 UTC
I can't think of a single good reason to run a program like that. I can think of 100 bad reasons to do so though. Killing a process like that is not a good way to handle this. Fix your code and don't try to hide what you're running.
anonymous
2011-07-15 17:56:32 UTC
1. Start notepad

System.Diagnostics.Process.Start("notepad")



2. Start winword

System.Diagnostics.Process.Start("WINWORD")



3. Start excel

System.Diagnostics.Process.Start("Excel")



4. Start ie and parameter

System.Diagnostics.Process.Start("IExplore.exe", "http://vbnetsample.blogspot.com/")



5. Kill It!!

' Kill all notepad process

Dim pProcess() As Process = System.Diagnostics.Process.GetProcessesByName("notepad")


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...