cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Simon_Yang
Level 6

How to let custom action impersonates as SYSTEM

I have a Basic MSI Project. In upgrade install, I want to use a CA to copy files to previous install folder. However, in order to protect the install folder, the security of that folder is set as only allow SYSTEM coping files to there. However, MSIEXEC lets the CA runs on local admin context, therefore copy file failed.

Can I change some settings in InstallShiled in order to let that CA runs on SYSTEM context?

Thanks a lot!
Labels (1)
0 Kudos
4 Replies
RobertDickau
Flexera Alumni

Does the action setting Deferred in System Context do what you want?
0 Kudos
Simon_Yang
Level 6

Seems like it shoud work.

But when I set "In-Script Execution" of the CA to "Deferred Execution in system context", when upgrade intall, I got an error message "Error 2762. Cannot write script record. Transaction not started"
0 Kudos
RobertDickau
Flexera Alumni

Deferred actions must be scheduled between InstallInitialize and -Finalize; ICE77 can catch this.
0 Kudos
Simon_Yang
Level 6

Yes,

I tried it again. It works perfectly!

Thanks!
0 Kudos