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

UNINSTALL_STRING changed since IS6.2 ?


4 replies to this topic

k758

k758
  • Members
  • 3 posts

Posted 26 March 2002 - 22:03

Hi,
Sometime between 6.2 and 6.31, the UNINSTALL_STRING now contains "-l0x9" at the end of it. This means that anyone following the instructions at <http://www.installsi...AvoidMaint.htm> on how to avoid maintenance mode (which says, in part, to detect the setup being run from Add/Remove Programs based on "if ( (CMDLINE % "UNINSTALL") && MAINTENANCE ) then" being TRUE, has a non-functioning Uninstall.

Does anyone know why or when this change to the default UNINSTALL_STRING value changed, or how the above check must be changed to get around it?

Thanks!
Betsy

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 26 March 2002 - 22:24

Why does that cause the uninstall to fail (or the detection)?

That parameter is used to specify the language for the setup. I think it's there to make sure maintenance mode runs in the same language as the initial install, instead of displaying the language selection dialog. Look at the release notes to find out in which version this was changed.

k758

k758
  • Members
  • 3 posts

Posted 27 March 2002 - 00:37

It fails (and thus treats a launch from Add/Remove Programs as a reinstall rather than an uninstall) because the lines:

       if (CMDLINE % "UNINSTALL") then
           ComponentRemoveAll();
       else
           ComponentReinstall();
       endif;

evaluates to FALSE since the CMDLINE contains the language identifier as well as my add-on ("UNINSTALL").

How could this statement be changed to strip off the language identifier?

Thanks!

k758

k758
  • Members
  • 3 posts

Posted 27 March 2002 - 00:53

Never mind. I can use the StrFind( ) function to determine if the "UNINSTALL" string is present.

However, the InstallSite page dealing with 'how to avoid maintenance mode' (<http://www.installsi...AvoidMaint.htm>) needs to be updated since the code example uses "%" rather than "StrFind".

Thanks!

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 27 March 2002 - 11:45

Have you actually tried this with % ? It should work.

CMDLINE = "UNINSTALL" will fail for obvious reasons.

But with % it should work: "If you need only a TRUE or FALSE return value indicating whether one string contains another string, (that is, if the location if the substring is unimportant), use the string find operator (%)" (from the help file for StrFind)

Therefore
CMDLINE % "UNINSTALL"
should evaluate to TRUE if CMDLINE includes the word "UNINSTALL"