is this the second thread on this subject?
Win32_Process class has terminate method. you will need to work out which process actually has a window open, perhaps one of the properties of the Win32_Process will reveal this info or you might have to look at associatorsof, the AppActivate method "You can use the task ID returned by the Shell function in place of title to activate an application." not sure if this relates to one of the Win32_Process properties....might be able to combine these?