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
thenemesizAsked:
Who is Participating?
 
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
All Courses

From novice to tech pro — start learning today.