I have a very simple C# custom action that deletes a folder at the very end of the installation on the "Finish" button click. The folder is deleted when I run the installer on a desktop, but not when it is run on a server. I am logged in as the Administrator. A VBScript that renames a file on the same event works on the desktop but not on the server. The server I am working with is a Windows Server 2008 R2.
I'm not sure why this happens. Can you please set your custom actions to run as deferred with no impersonation and see if the behavior still persist? Also, can you try to manually run the related custom actions on target machine and see if they work as expected?
I apologize because I was not aware that your custom action is added without sequence. Can you please add your custom action as a custom action with sequence, scheduled before "Install Execution Stage -> Finish Execution -> InstallFinalize" standard action, and see if the behavior persist? Also, as another approach you can enable the "Run as administrator" option from "Install Parameters" page and see if this works.
That is because you have an older version of Advanced Installer, no problem. Just drag and drop the custom action before InstallFinalize, and set it
as "Deferred with no impersonation", so it executed with full admin permissions.