This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Problem: Replacing INSTALLDIR via custom action
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 05, 2012
08:55 AM
Problem: Replacing INSTALLDIR via custom action
Hi,
i am trying to replace INSTALLDIR with this function:
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,
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,
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 06, 2012
09:34 AM
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.