PDA

View Full Version : How can I modify CommonAppDataFolder at run time?



oliviers
01-28-2010, 08:51 AM
Hi,

I'm supposed to install a file under [CommonAppDataFolder]\xxxxxx.
xxxxxx is a public parameter set with the msiexec command line.
I'm thus wondering how to do that.

I created a custom action that would set the property and create the target folder is needed :
SetupDir = Property("MYPROPERTY")
Target = Property("CommonAppDataFolder") & SetupDir
Property("CommonAppDataFolder") = Target
MsgBox Property("CommonAppDataFolder") 'for debug purpose

--folder creation stuff

The message box is fine, displaying the correct path.
The path is correctly created.
My file is not copied into the correct folder, just like if the property had not been changed...
I added the custom action after the "After Initialization" event.

Any tip? Any other way to achieve that?

Thanks,

Olivier