How do I perform a search in the Application Folder during uninstall?

This article is useful during an upgrade when you need to reference the APPDIR folder property in a search added from the Search page.

Searches are performed during the AppSearch standard action whereas APPDIR property is resolved during CostFinalizestandard action.

Since by default AppSearch is executed before CostFinalize in the installation sequence, the solution is to move AppSearch after CostFinalize as described in Custom Actions Page > Operations section > Organizing Standard Actions.