Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 8

Using MsiSetProperty in InstallScript Custom Action

I have a Basic MSI project with some InstallScript Custom Actions.

From within an InstallScript custom action, I can get the values of properties just fine (with MsiGetProperty), but calls to MsiSetProperty and MsiSetTargetPath don't seem to be working.

I am trying to set AppDataFolder to the value I want based on the version of Windows. Since AppDataFolder is a folder in the Directory table, I tried using MsiSetTargetPath, but with the same results, it's not being changed. Even when the return value from MsiSetTargetPath signals Success.

In some threads I've read, it seemed like some people were eluding that you could only use public (all uppercase) properties with MsiSetProperty, but I can't find anything to back that up.

I have read the threads and Help about using deferred custom actions to get values of properties, but I can get the values of properties just fine. So, I don't think that is the answer for me.

Any suggestions?
Labels (1)
0 Kudos
(1) Reply
Level 8

I found some information in the Help that leads me to think you can't change a private property like AppDataFolder by using MsiSetTargetPath.
0 Kudos