I am virtualizing what appeared to be a pretty straightforward application but when some but not all of the entry points close I get a memory exception and the "OK" box must be hit by the end user before the process will shutdown.
I have stared experimenting with the kill process vbscript that is floating around and using GetCurrentProcess for the process name but I seem to be getting a NULL return from that so the fight continues... Here is the script as I hav e it right now:
Function OnFirstParentExit
Dim objWMIService, objProcess, colProcess
Dim strComputer, strProcessKill
strComputer = "."
strProcessKill = GetCurrentProcessName
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcess = objWMIService.ExecQuery ("Select * from Win32_Process Where Name = " & strProcessKill )
For Each objProcess in colProcess
objProcess.Terminate()
Next
End Function