Home » App-V » App-V 5.x » App-V 5 and Killing Child Processes

App-V 5 and Killing Child Processes

Posted on by

I recently packaged an application that, upon launch, started a process called EntDistributorService.exe (the parent process).

EntDistributorService.exe spawned a child process called hvced.exe (I knew hvced.exe was a child process by running the wmic command found here.), which remained running when the launched application was closed.

When a process contained within the App-V package remains open, it presents issues when we need to unpublish it – the App-V package can’t be unpublished if it is still deemed as being in a ‘running’ state!

I tried to kill hvced.exe using a script (I tried taskkill.exe and Powershell’s Stop-Process) which ran in the ExitProcess scripting phase of the UserConfig.xml.  Unfortunately the context that these scripts run in didn’t have enough permissions to kill the process, since EntDistributorService.exe was launched in a SYSTEM context and as a result hvced.exe was also running in a SYSTEM context.

After all this fiddling around, it turned out that the solution was quite simple really.  In the DeploymentConfig.xml file we can simply add the parent file who’s child processes we want to terminate like so:

    <Application Path="[{AppVPackageRoot}]\VFS\ProgramFilesCommonX86\HealthVISION\EntDistributorService.exe" />         

And it worked like a charm.

Comments have now been disabled. If you have a question to ask about this post please ask the community!