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

Conditional Statement: Installdir is under ProgramFilesFolder


3 replies to this topic

BkSetupDev

BkSetupDev
  • Full Members
  • 22 posts

Posted 13 June 2017 - 15:04

I have to detect, if our software is instelled to ProgrammFilesFolder (default is C:\ProductName). If so, some files have to be installed into ProgramData. So I choose CA Nr. 291 an set the dircetory value of those directories to [CommonAppDataFolder]...

 

As condition I stated INSTALLDIR << ProgramFilesFolder, which - as I understand - means TRUE when INSTALLDIR starts with the content of ProgramFilesFolder (e.g. "C:\Program Files (x86)\").

 

It worked fine, but now I have a system, where the condition is true, but INSTALLDIR does not start with "C:\Program Files (x86)\". How does this happen?



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 15 June 2017 - 20:46

What are the actual values of INSTALLDIR and ProgramFilesFolder (check the log)?



BkSetupDev

BkSetupDev
  • Full Members
  • 22 posts

Posted 27 June 2017 - 09:58

What are the actual values of INSTALLDIR and ProgramFilesFolder (check the log)?

Last Property metions in log before error line are

AppSearch: Property: INSTALLDIR, Signature: NewSignature137
MSI (s) (D0:D8) [09:21:33:861]: PROPERTY CHANGE: Adding INSTALLDIR property. Its value is 'C:\Software\'.

MSI © (F4:98) [09:17:03:958]: Dir (target): Key: ProgramFilesFolder    , Object: C:\Program Files (x86)\



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 28 June 2017 - 14:41

Why did you set the custom action to "run only once"? If your installation runs with UI this means it will only run in the UI sequence.

I notice that the INSTALLDIR line in your log is in the execute phase - server side, maked with (s) - while the ProgramFilesFolder value is logged in the UI phase - client side, marked with ©.