In order to achieve what you want, you can use our predefined "Execute inline script code" custom action and place it after "Finish Execution" action group. You can add the "Execute inline script code" custom action by going to "Custom Actions" page and adding it by pressing the "Add custom action with sequence" button which is located to the right side of the custom action name.
After adding it, simply drag and drop it after the "Finish Execution" action group (In "Install Execution Stage").