cancel
Showing results for 
Search instead for 
Did you mean: 
scheinkultur
Pilgrim

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
Flexera MichaelU
Flexera

Re: Problem: Replacing INSTALLDIR via custom action

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