I recently dealt with an issue where a customer had several machines attempting to perform a non-interactive DC Refresh via a third-party program. This program called Beyond Trust was failing with the following error in the SFTLOG.TXT:

[03/23/2011 13:52:50:127 SRVC ERR] {tid=1654:usr=steveth}
Failed to open connecting process handle to track process termination (PID 7604, error 5).

NOTE: This does not have to happen with just this particular program. This could also occur with any program that attempts to process this command under the context of a user account (with or without UAC disabled.)

ALSO NOTE: This is not to be confused with the similar process termination error (997.)

Simple elevation to the user's context will not suffice. The call to refresh against the server will still need to be called from the credentials of the targeted user account in which it must be able to also call SFTDCC at the same time.

The best resolution to this issue would likely be to use something such as the built-in Scheduled Tasks within Windows to achieve offline non-interactive refreshes against the App-V server. Then simply create and distribute the *.job file for this.

Specific information related to the SchTasks command is found here:

http://msdn.microsoft.com/en-us/library/bb736357(VS.85).aspx