This would appear to initially be architecture related. Ensure for all parts of the custom action, programs, paths and file names, etc. are valid. Also as mentioned, always apply installers via the administrator account.
If you're calling an EXE stored in the binary table, ensure you're referencing it correctly as well. Often the Windows installer unpacks an MSI to '%temp%' folder so confirm access and path is correct. MSIEXEC extracts temporary files, for example, 'MSID974.tmp' there which then carries out a pre-configured MSI function, but falls over.
Lastly, try generating a verbose MSI log file. It will help you pinpoint the issue hopefully more clearly.
app.manifest. The thing is that I need to move some files from a previous version installation of the software in Program Files so I need the admin permissions to do so. When I'm not setting the executable to run as administrator, the error doesn't come up, but I'm getting anUnauthorizedAccessExceptionwhen trying to move the files. - Pantelis