Is there anyway to check if an external process is running, then terminate
it if it is? my problem right now is in my installer the user might try to
upgrade while the program is running... I want to check if it is running,
notify them it is, then ask them if they want to terminate it or not...
thanks! 2 3968
On Apr 10, 8:27 pm, "Smokey Grindel" <nos...@nospam. comwrote:
Is there anyway to check if an external process is running, then terminate
it if it is? my problem right now is in my installer the user might try to
upgrade while the program is running... I want to check if it is running,
notify them it is, then ask them if they want to terminate it or not...
thanks!
Smokey,
To terminate a process:
' Be careful not to add ".exe" extension to your process name
For Each myprocess As Process In Process.GetProc essesByName("pr ocess")
myprocess.Kill( )
Next
Thanks both of you!
"kimiraikko nen" <ki************ *@gmail.comwrot e in message
news:17******** *************** ***********@s39 g2000prd.google groups.com...
On Apr 10, 8:27 pm, "Smokey Grindel" <nos...@nospam. comwrote:
>Is there anyway to check if an external process is running, then terminate it if it is? my problem right now is in my installer the user might try to upgrade while the program is running... I want to check if it is running, notify them it is, then ask them if they want to terminate it or not... thanks!
Smokey,
To terminate a process:
' Be careful not to add ".exe" extension to your process name
For Each myprocess As Process In Process.GetProc essesByName("pr ocess")
myprocess.Kill( )
Next
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Sean |
last post by:
I can connect to a machine remotely with no problems but I'm having trouble
trying to create a process remotely. Initially this was a perl and VB
script which I'm converting to python. Its entire purpose is to start a
process remotely. The problem initially was that the perl script could not
'see' any mapped drives as it would alway return 'access denied' so I'm
trying to not only rewrite the script but fix this problem and my idea was...
|
by: Powerguy |
last post by:
Hi all,
I've spent countless hours trying to get this silly EXCEL process to
close once I have used it. If anyone can help it would really REALLy
be appreciated! Below is my code-
Dim t As Integer
Dim testCount As Boolean
testCount = False
For t = 0 To UserListView.Items.Count - 1
|
by: lgbjr |
last post by:
Hi All,
I have a VB.NET app that, among other things, writes data to Excel. I am
having trouble getting the Excel process to terminate after I quit Excel. I
found an article related to this problem:
http://support.microsoft.com/default.aspx?scid=kb;en-us;317109
Below is a sample of code that I wrote based on the above article. The excel
workbook, worksheets, and all of the cells are properly formatted when Excel
|
by: Patrick A. |
last post by:
Dll written in VB.NET 2003 to start a command remotely.
You can :
- launch the command and wait until it's finished. (Ex. 1)
- launch the command providing a timeout in seconds, it will wait until
it's finished. If the command didn't terminate within the timeout, the
command is killed. (Ex. 2)
- launch the command and continue your processing after the command has
been started remotely (Ex. 3).
|
by: Thomas Dybdahl Ahle |
last post by:
Hi, I'm writing a program, using popen4(gnuchess),
The problem is, that gnuchess keeps running after program exit.
I know about the atexit module, but in java, you could make a process a
daemon process, and it would only run as long as the real processes ran. I
think this is a better way to stop gnuchess, as you are 100% sure, that
it'll stop.
Can you do this with popen?
| |
by: SeC |
last post by:
Hi.
Is there any way to detect if application is being killed by 'End
Process' via Task Manager ?
|
by: Chris |
last post by:
I have a python script that is driving Excel and using the win32com
module. However, upon program completion there's still an Excel.exe
process running in the background that I must terminate through Task
Manager. Reading up on other threads indicate that maybe I still have
some Excel objects referenced within my code. Is this why the process
doesn't terminate?
The related (I hope) parts of my code is here.
x1App =...
|
by: cnsabar |
last post by:
Hi.,
I need a Perl script to terminate the any running process in server. by specifying computer name and process name..
I have the following code to terminate the any process by specifying the process name in the local system...
use Win32::Process::List;
use Win32::OLE;
|
by: Salim Fadhley |
last post by:
Does anybody know of a python module which can do process management
on Windows? The sort of thing that we might usually do with
taskmgr.exe or process explorer?
For example:
* Kill a process by ID
* Find out which process ID is locking an object in the filesystem
* Find out all the IDs of a particular .exe file
* Find all the details of a currently running process (e.g. given an
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |