Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

RunTime Alteration to Directory Table


1 reply to this topic

andyguest13

andyguest13
  • Full Members
  • 21 posts

Posted 07 May 2009 - 16:56

Starting a new topic - this is a reply to someone already but i am not sure everyone will see it as it is old - sorry if i got that protocol wrong!
---------
Here is what i want to do: I need to install things to two places:

1. Programs are to go to [INSTALLDIR] eg c:\program files\myApps
No problem with that.

2. Some user files are to go to CommonAppData\myApps.
No problem with that either, 'myApps' is the default.

But - the user can change [INSTALLDIR] to say c:\program files\FRED\.
If they do this then the user files must go to CommonAppData\FRED.

So at runtime, i have a CA running as a DoAction on the Next button on DestinationDialog. This CA parses FRED out of INSTALLDIR by seeing what comes after c:\PRogram Files\ string, and sets a property called USERFOLDER (which is actually a Directory Table item) to CommonAppData\FRED. THis CA does seem to run AFTER CostFinalize which is where i think it is supposed to be. I use MsiSetTargetPath()

But in my final installed folder structure i do not get FRED but i get a folder called [USERFOLDER] ie the property in Directory table has not been resolved. Is that becasue i am doing things at the wrong sequence? Is there another better way, given i don't know till runtime the Property.

Here is part of my Directory Table:

Directory - (s72) - Parent -- DefaultDir
_USERFOLDER_ - CommonAppDataFolder - _USERF~1|[USERFOLDER]
USERFOLDER - CommonAppDataFolder - DEFAUL~1|Default Place


thanks
andy


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 08 May 2009 - 08:55

QUOTE
Starting a new topic - this is a reply to someone already but i am not sure everyone will see it as it is old - sorry if i got that protocol wrong!

It's okay to start a new topic, but if you do there's no need to duplicate your question in the old thread. smile.gif

QUOTE
_USERFOLDER_ - CommonAppDataFolder - _USERF~1|[USERFOLDER]

You can't put a proeprty as DefaultDir in the Directory table. Give it some more or less useful default directory (this is also used in your CD layout), then later change it using your custom action.
Not sure why you have USERFOLDER and _USERFOLDER_ ? Why don't you simply set USERFOLDER with your custom action?