Loading
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!

  • Community Manager (Flexera Software)

    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...
  • " 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?
    Expand Post

Loading
how to use [ProgramFilesFolder] like environment varible