App-V, Configuration Manager 2007 and user based targeting of applications

image As you can see in the Whitepaper for the App-V Integration in SCCM, it’s not possible to configure SCCM 2007 for user based targeting on Terminal Servers (RDS).

As a workaround to this, some customers have written logon scripts or used third party apps like Citrix or AppSense that run multiple SFTMIME instances at user logon to publish the application.  While this appears to work at first, from time to time some applications may eventually fail because the OverrideURL value under the Packages key in the Registry that is used by Configuration Manager 2007 will be deleted. From that point on no user on that Terminal Server will be to use the app anymore.  Instead, the following error will be logged:

The specified command line is incorrect.
The specified package does not exist. Report the following error code to your System Administrator.
Error code: 4514197-18303E04-00001804

What is that reason?

As soon a user logs on and starts SFTMIME.EXE PUBLISH PACKAGE via a logon script or from a third party application, we try to publish the app and read a specific global Registry Key on the Terminal Server. If a second user logs on at the same time and gets the same package then both of the SFTMIME.EXE processes call the SFTLIST service so now you have two threads trying to access the same registry key at the same time.  What happens is that one of the threads will get a result of INVALID, and if the key is missing or INVALID then it will be deleted.

This behavior has been known since Windows NT 4.0:  https://support.microsoft.com/kb/176906

Why didn’t we notice this earlier?

Frankly we didn't notice this earlier because the method above is not a tested and supported way of publishing an application using App-V.  Only after a few folks implemented the workaround above and ran into a problem did we become aware of it.

With that said, a fix for this is scheduled to be in the next Hotfix rollup release for App-V Service Pack 1. Does that guarantee it will be?  Absolutely not, since we won't know what's in the final package until it goes out the door but so far that's the plan.

Kind regards,

Sebastian Gernert | App-V Support Escalation Engineer