When you have a behavior in your desktop that doesn't make sense, it might be a conflict between multiple layers.
First, verify that an absolute minimum of necessary layers (for instance, just the OS and the specific app layer having a problem) function properly. To do this, publish a new image with just those layers, and with the Elastic Layering mode set to "None". If the software doesn't work when there is no other possible conflict, then try recreating the layer with the current version of the OS layer. Or edit the layer and verify that the software works in the packaging machine. Make it work in the packaging machine first.
Once you have verified that the software works in a new image with no other layers, and Elastic Layering turned off, then start adding back things until it breaks. First, try turning Elastic Layering or User Layers back on, without adding any layers, to test specifically to see if this is a conflict with the App Layering filter driver. Note, however, that it's possible to have a problem that requires both a second layer and Elastic Layering, so once you identify a second layer causing the problem, check to see if Elastic Layering is a required element.
If it's not a problem with the filter, then it's a problem with another App Layer or the Platform Layer. You will want to publish images with different combinations of layers (with Elastic Layers turned on if it was turned on in the original problem identification) to determine what it is. Rather than doing this one at a time, divide your layers in half, and test them that way. Test the first half of your layers, and if that works, then the failure must be in the second half. Then divide that set in half, and so on.
NOTE for V2/V3: You should test only on new desktops rather than editing existing desktops. The reason you need to check this on a new desktop is because of the personalization. The data in the personalization can be different depending on what layers were present at desktop creation. If a desktop gets a bad file from a layer and modifies it, that bad file is pulled into the personalization layer, where it lives forever. Even if you change the layers that are assigned to the desktop, the file in the personalization persists.
When a desktop modifies a file and pulls it into the personalization, it gets the initial state of that file from one of the available layers. So it matters what layers are present when a desktop goes to modify a file. Thus, it matters what layers a desktop was created with. Once the personalization has a copy of a bad version of that file, it will keep that. So basic testing needs to be done with new desktops that have no personalization.
Note that both persistent and non-persistent desktops have user layers -- NP desktops simply have it frozen at creation. Using NP desktops is not a substitute for using brand new ones.
Once you know what app layers are in conflict, you need to experiment to test how to make them work. Usually you only have two options if Layer B doesn't work in the presence of Layer A: either create Layer B with Layer A as a prerequisite, or create a single A+B layer. Conflicts come from two pieces of software each modifying something without knowing that the other exists. Using a prerequisite or combining the layers allows them to be aware of each other and combine their changes instead of overwriting them.
About layer priority: Sometimes you can (at least temporarily) resolve a conflict by changing the priorities of the app layers involved. In all versions of the product, the OS layer is the lowest priority and the user layer is the highest. Beyond that, the ordering logic varies between versions:
In V2, app layers are prioritized based on the creation date of the version assigned to the desktop. This makes it easy to test -- you can add a version to an app layer, do nothing and finalize, and know that your new version will be the highest priority app layer, at least until you make something else newer. The Management Console also has a UI for changing layer priority, but it does not do the same thing as merely versioning a layer. The experience of Support has been that it is almost never worth the damage to your sanity involved in using the Change Layer Priority wizard.
In V3, app layers are prioritized based on the creation date of the layer, and new versions have no effect on priority. There is no UI-based method to change layer priority. Creating new layers is the only way to change layer priority in V3.
In V4, things are a little more complicated. Like V3, app layers are still prioritized based on layer creation date, so creating new layers is the way to experiment. However, the ordering in 4 is OS < App Layers in the base image < Platform Layer < App Layers mounted elastically < User Layer. This is one reason why you need to test without elastic layers first -- they add an extra level of complexity.
Note that SSO (Single Sign-On) software will often have this conflict, which is why you always need to put all your SSO software together in the Platform Layer.
In V2/V3, to rehabilitate existing desktops, you need to fix the system for new desktops and then clean up old desktops. The easiest way is to use Reinstall to remove the poisoned configuration from a desktop, and let your fixed layer stack work properly.
The way you can remove a bad file from a desktop is with the "Reinstall" checkbox. Click your desktop, Edit Desktop, go down to Layer Assignments, and click the Reinstall checkbox on the View Agent layer. What that does is look through the personalization for any files that are being provided by the View Agent layer, and remove them from the personalization. Then the next time the desktop goes to look for that file, it will find it in the layers instead of the personalization.
However, this doesn't mean that it will find it in the layer you want. If your desktop has more than one layer providing the conflicting file, the desktop will take whatever layer has the highest priority, which might not be the one you want. It's not enough to remove the layers, you also had to scrub the poisoned file from the personalization one way or another. You need to actually fix your layers as above first, so that when your desktop looks for the file, it finds the right one from the right layer.
Problem Cause