cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
scheinkultur
Level 2

Problem: Replacing INSTALLDIR via custom action

Hi,

i am trying to replace INSTALLDIR with this function:


function SetClientLocation(hMSI)
begin
MsiSetProperty(hMSI, "INSTALLDIR", "C:\\MyDynamicallySelectedFolder");
end;


While it works for files that i placed directly in the installdir ( in the files & folders view ), it does not work for sub-directories placed in the INSTALLDIR...

Any ideas why this happens? ( Already tried with a final backslash: "C:\\MyDynamicallySelectedFolder\\" - not working )

Regards,
Labels (1)
0 Kudos
(1) Reply
MichaelU
Level 12 Flexeran
Level 12 Flexeran

If this function is called after costing (which builds the directory tree), you need to use MsiSetTargetPath instead. If it's called before costing, it must set the property like it currently does.
0 Kudos