Re: Macro to kill a process
- From: "Carlos J. Quintero [VB MVP]" <carlosq@xxxxxxxxxxxxxxxxxxx>
- Date: Tue, 10 Jan 2006 15:35:37 +0100
Dim objProcess As System.Diagnostics.Process
For Each objProcess in
System.Diagnostics.Process.GetProcessesByName("notepad.exe")
objProcess.Kill
Next
--
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio 2005, Visual Studio .NET,
VB6, VB5 and VBA
You can code, design and document much faster in VB.NET, C#, C++ or VJ#
Free resources for add-in developers:
http://www.mztools.com
"Lynn" <MarryLynn@xxxxxxxxx> escribió en el mensaje
news:OYrWoVeFGHA.1676@xxxxxxxxxxxxxxxxxxxxxxx
> Hi,
> can i know how does the code looks like?
> thanks
>
> "Carlos J. Quintero [VB MVP]" <carlosq@xxxxxxxxxxxxxxxxxxx> wrote in
> message
> news:OkuKeqcFGHA.2708@xxxxxxxxxxxxxxxxxxxxxxx
>> Hi,
>>
>> You can use the System.Diagnostics.Process.GetProcessXXX() static methods
>> and once you have the Process you use the Kill method.
>>
>> --
>>
>> Best regards,
>>
>> Carlos J. Quintero
>>
>> MZ-Tools: Productivity add-ins for Visual Studio 2005, Visual Studio
>> .NET,
>> VB6, VB5 and VBA
>> You can code, design and document much faster in VB.NET, C#, C++ or VJ#
>> Free resources for add-in developers:
>> http://www.mztools.com
>>
>>
>> "Oenone" <oenone@xxxxxxxxxxx> escribió en el mensaje
>> news:%23ACm1NTFGHA.3100@xxxxxxxxxxxxxxxxxxxxxxx
>> > Hopefully this is the right place to post this -- if not, please let me
>> > know where the appropriate place is.
>> >
>> > Can anyone point me to a VS2005 macro that locates a running Windows
>> > process by name and then kills it?
>> >
>> > Many thanks,
>> >
>> > --
>> >
>> > (O)enone
>> >
>>
>>
>
>
.
- References:
- Macro to kill a process
- From: Oenone
- Re: Macro to kill a process
- From: Carlos J. Quintero [VB MVP]
- Re: Macro to kill a process
- From: Lynn
- Macro to kill a process
- Prev by Date: A file with the same path already exists in the project.
- Next by Date: Re: what does it mean when you get 2 files with same name except :#
- Previous by thread: Re: Macro to kill a process
- Next by thread: Re: Macro to kill a process
- Index(es):
Relevant Pages
|
Loading