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: how to use [ProgramFilesFolder] like environment varible
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
‎Jul 23, 2008
01:20 PM
how to use [ProgramFilesFolder] like environment varible
I had a basic MSI project. The default install path is [ProgramFilesFolder]\productname. And I change the install path by a custom action at runtime.
What the custom action did is set a full path to proprety [INSTALLDIR]. This mechanism works fine.
However, what I need now is changing the install path to some thing like [ProgramFilesFolder]\UserDefineSubpath at runtime. Can I just set [INSTALLDIR] as [ProgramFilesFolder]\UserDefineSubpath or some express like that. I tried [ProgramFilesFolder]\UserDefineSubpath, but installer cannot resolve [ProgramFilesFolder] if I just set [ProgramFilesFolder] to [INSTALLDIR].
Anyone has idea about this?
Thanks!
What the custom action did is set a full path to proprety [INSTALLDIR]. This mechanism works fine.
However, what I need now is changing the install path to some thing like [ProgramFilesFolder]\UserDefineSubpath at runtime. Can I just set [INSTALLDIR] as [ProgramFilesFolder]\UserDefineSubpath or some express like that. I tried [ProgramFilesFolder]\UserDefineSubpath, but installer cannot resolve [ProgramFilesFolder] if I just set [ProgramFilesFolder] to [INSTALLDIR].
Anyone has idea about this?
Thanks!
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2008
06:06 PM
How are you trying to set INSTALLDIR? What kind of custom action? A set-a-directory custom action should resolve [DirectoryID] expressions as you describe it...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 23, 2008
09:10 PM
RobertDickau wrote:
How are you trying to set INSTALLDIR? What kind of custom action? A set-a-directory custom action should resolve [DirectoryID] expressions as you describe it...
I used MsiSetProperty to set [INSTALLDIR]. If I used this function set installdir as a full path, it works. But can I use this function set INSTALLDIR to [ProgramFilesFolder]\..... or something like that.
What is set-a-directory custom action ? Did you the action ResolveSource?