App-V 5 publishing error (Return code: 0x59701907 - 0xb)

When publishing an App-V 5 application, on the client during or after a publishing refresh, the application is not available on the client. The following error appears in the event viewer under the Microsoft\App-V section: Return code: 0x59701907 - 0xb

In my case this occurred, because the %appdata% and %localappdata% variables were not available. This happened because the mandatory profile I was using missed the AppData and Local AppData values in the registry under HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders. Check if the values exist. If they don’t, create them and point them to the correct locations in the user profile.

AppData –> %USERPROFILE%\AppData\Roaming Local AppData –> %USERPROFILE%\AppData\Local