tbomgardner
Level 3

Custom Actions and elevation

Does a custom action configured for Deferred Execution in System Context run elevated?  I have a custom action that seems to be running as admin, but not elevated.  The action runs an app that is part of the installation, and one of the things it does is kill a process.  The kill fails with access denied.  However, the app, when run standalone instead of as a custom action, has no trouble killing the process.  

Labels (1)
0 Kudos
2 Replies
Jenifer
Flexera Alumni

Hi @tbomgardner ,

It is supposed to be run as system i.e without user impersonation

Deferred, Rollback, or Commit Execution in System Context

Like deferred execution actions, deferred-execution-in-system-context actions do not launch until the script that generated by the Windows Installer is run. However, actions of this type execute with no user impersonation.

Similarly, rollback-execution-in-system-context and commit-execution-in-system-context actions execute with no user impersonation.

Because of the elevation of privileges on Windows Vista and later systems, deferred custom actions must be made in system context if they need to make system changes that require elevated privileges.
Deferred custom actions in user context may not have elevated privileges even if an administrator runs the installation on a Windows Vista or later system, and
thus should be avoided for custom actions requiring higher-level privileges.


From link:https://docs.revenera.com/isxhelp19/helplibrary/ActionExecutionOptions.htm

Any hint you could get from log file?

Thanks,

Jenifer

0 Kudos

Thanks for responding, Jenifer.  I've simplified the test case to just a Kill Process custom action named Kill_IngOPOSSO, which fails.  See the attached png file.  After the installer runs, IngOPOSSO.exe shows as still running in the task manager, and task manager has no trouble killing it.

The log file contains this

Action start 15:54:45: Kill_IngOPOSSO.
Action ended 15:54:45: Kill_IngOPOSSO. Return value 1.

I assume a return value of 1 indicates a failure, but there's no indication of why.  I've included the log file in case it has some other useful information.

Can you suggest anything else I might try?  Thank you again for taking a look at this.

0 Kudos