Solved

terminate & start process in VB6

Posted on 2010-08-24
2
929 Views
Last Modified: 2012-05-10
How can I terminate a running windows process in VB6, the start it again?
 I have the process name and the .exe path
0
Comment
Question by:thenemesiz
2 Comments
 
LVL 20

Accepted Solution

by:
alainbryden earned 500 total points
ID: 33510661
0
 
LVL 11

Expert Comment

by:thydzik
ID: 33519985
see the attached code
Dim objshell
    Set objshell = CreateObject("Wscript.Shell")
	
    'kill a process
    objshell.Run "taskkill /IM programname.exe", 0, True
	
	'start a process
    objshell.Run "programname.exe", 0, True

Open in new window

0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now