[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 983
  • Last Modified:

terminate & start process in VB6

How can I terminate a running windows process in VB6, the start it again?
 I have the process name and the .exe path
0
thenemesiz
Asked:
thenemesiz
1 Solution
 
alainbrydenCommented:
0
 
thydzikCommented:
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now