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

IS setup version detecting (5.5, 6.x)


1 reply to this topic

gronchi

gronchi
  • Members
  • 71 posts

Posted 27 November 2002 - 17:06

Hi to all,
how is the safest way to discovery (inside of a project script) IS version used to build another setup.
Now I check setup.ins/setup.inx presence:

...browsing filesystem (CDROM, Hard disk, ...)
svSetupDir = setup directory

Code Sample

svSetupPath = svSetupDir ^ "setup.inx";
if (Is(FILE_EXISTS, svSetupPath)) then  // IS6.x setup
  bisIS6x = TRUE;
  bisIS55 = FALSE;
  #ifdef DEBUG_LEVEL_1
     SprintfBox(INFORMATION, "Setup type", "We have detected a IS6.x setup");
  #endif
else
  svSetupPath = svSetupDir ^ "setup.ins";
  if (Is(FILE_EXISTS, svSetupPath)) then // IS5.5 setup
     bisIS6x = FALSE;
     bisIS55 = TRUE;
     #ifdef DEBUG_LEVEL_1
        SprintfBox(INFORMATION, "Setup type", "We have detected a IS5.5 setup");
     #endif
  else // Unable to detect IS setup version
     bResult = FALSE;
     #ifdef DEBUG_LEVEL_1
        SprintfBox(INFORMATION, "Setup type", "Unable to detect IS setup version");
     #endif
  endif;
endif;


Is this a good way?
Are there others?


Thanks.
Ciao, Giuseppe

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 28 November 2002 - 09:43

You could look at the version info of setup.exe