cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dannyw
Level 3

MSI Custom action running with admin priviledge

I am working on a basic MSI project. I have a custom action which downloads some information from a server and writes it to my install folder.

At first i set the custom action to be "Immediately execution", but it failed to complete. Then I found out that the custom action needs to run with admin priviledge to create file under the folder in Program Files folder.

I did a search and found a solution to set the CA as "Deferred Execution in System Context". However my CA cant access the MSI properties with this setting...!

So I wanna ask if there is a setting for CA to run with admin right, and yet to be able to access MSI properties.

Or did i miss something here? Thanks.
Labels (1)
0 Kudos
(3) Replies
dannyw
Level 3

i found the solution for my problem which is to use the CustomActionData property.

If you are facing similar issues please follow the link here
http://www.installshield.com/news/newsletter/0308-articles/CustomActionData.asp
0 Kudos
rrinblue22
Level 9

you are true that setting a custom action in "Deferred Execution in System Context" will be executed with privileges.
But in deferred execution you can't access the MSI properties directly.
Check this for deferred custom actions.
0 Kudos
dannyw
Level 3

rrinblue22 wrote:
you are true that setting a custom action in "Deferred Execution in System Context" will be executed with privileges.
But in deferred execution you can access the MSI properties directly.
Check this for deferred custom actions.


Thanks. I have found the solution which is to use CustomActionData 🙂
0 Kudos