App-V 5 and Services that are not LocalSystem

In writing some apps for some APP-V 5 performance testing, I stumbled on a problem that was at least new to me.

I know that in App-V 5 the client will only run Virtual Services under the Local System account. But I didn’t know that it totally ignored the others, I thought it captured them and just changed the account. It doesn’t do that. It will only capture services that are set to run under the Local System account.

This is very odd, since if you use Visual Studio 2013 and create a new software project in C# for a service, the sample code that Microsoft provides developers on MSDN to create a service is set to run under the Local Service account. So we aren’t talking legacy code here. Meaning that Microsoft’s App-V 5 doesn’t capture its own sample app.

In the days of old, virtual services could be run under any credentials. During one of the App-V 4.6 releases (SP1 or SP2, I don’t remember), the sequencer changed and although it would capture the service and service account, the sequencer GUI was changed to no longer allow us to change the account on the Sequencer editor tab. This, while not ideal, was OK. It was rare that you would actually need to change the account, but if you did you just needed to think about it in advance and change it in the Windows Services Manager while in monitoring mode. And you would only do this if you had a good reason AND knew the app well enough to know if changing the account would work.

Back to App-V 5. Because the client will only run services under the Local System account now, I guess the sequencer guys decided to only capture those services set to run under Local System. ALL OTHER SERVICES ARE SILENTLY IGNORED. No warning, no nothing. Yes I can get those services to run virtually in most cases, but:

  • I have to know that a service is missing.
  • I have to re-try the sequence and, while in monitoring mode, change the service logon account using the Windows Services Manager.
  • I have to figure out how to test if this causes a problem.

It is that first bullet that is the problem. At a minimum, the sequencer should put up a warning in the report. Something like the DCOM warning would help an awful lot. Much better would be to just capture the service, changing the logon account for the service, and then warn me. That would kill off the second bullet above. Best would be to support virtual services under any account, but I guess that I can live without that.

Yeah, I still have that third bullet. But that legitimately is my problem and not Microsoft’s.

By Tim Mangan

Tim is a Microsoft MVP, and a Citrix CTP Fellow. He is an expert in App-V and MSIX.