Warnings with ExtractFileDir and SameStr case-sensitivity issue

45 views
Skip to first unread message

The Amma Twain

unread,
Dec 8, 2025, 4:14:09 AM (11 days ago) Dec 8
to innosetup

Hi,

I’m currently trying out Inno Setup (6.6.1) and have noticed a couple of minor issues:

  1. #define blablabla ExtractFileDir([a directory]) triggers the following warning:
    Warning: Function "RemoveBackslash" has been renamed. Use "RemoveBackslashUnlessRoot" instead.

  2. SameStr('string','String') does not seem to be case sensitive.

Just thought I’d report these. Thanks for your attention!

Best regards,

@

Martijn Laan

unread,
Dec 8, 2025, 6:07:41 AM (11 days ago) Dec 8
to innosetup
Hi,

Thanks for reporting.

1. This is caused by an outdated function in ISPPBuiltins.iss. If you place the attached version over the one in your Inno Setup installation folder, it will no longer trigger a warning.

2. I’ve checked, and all string comparison operators in ISPP are case-insensitive, and always have been. At the same time, ISPPBuiltins.iss' SameStr relies on them being case-sensitive. I’m not going to make these operators case-sensitive all of a sudden, but I will make sure SameStr becomes case-sensitive in the next version. You can’t fix this yourself.

Greetings,
Martijn

Op 8-12-2025 om 10:12 schreef The Amma Twain:
--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/innosetup/5cac4638-846b-4a7a-8533-8fd75cdf5112n%40googlegroups.com.

ISPPBuiltins.iss

The Amma Twain

unread,
Dec 8, 2025, 11:02:15 AM (11 days ago) Dec 8
to innosetup

Hi Martijn,

Thank you so much! I’ve put the new version to work right away, and the warnings are gone.

Have a great day!

@

The Amma Twain

unread,
Dec 8, 2025, 11:49:22 AM (11 days ago) Dec 8
to innosetup
For now, I’ve set it up like this (hoping there won’t be any MD5 collisions…):  
#define SameStr(str A, str B) \
  GetMD5OfString(A) != GetMD5OfString(B) ? 0 : 1

@

Il giorno lunedì 8 dicembre 2025 alle 12:07:41 UTC+1 Martijn Laan ha scritto:

The Amma Twain

unread,
Dec 8, 2025, 1:03:48 PM (11 days ago) Dec 8
to innosetup

Just this one message and then I’ll stop! :)
In case it might be useful to someone,
and while waiting for a proper revision of the string comparison procedures,
here’s a solution that could serve as a temporary fix…

@

; SameStr(S1, S2) - Compile-time string comparison in ISPP
; Returns 1 if strings are exactly the same, 0 otherwise
; Comparison steps:
; 1. Check if the lengths of S1 and S2 are equal
; 2. Check ISPP's case-insensitive comparison (S1 != S2)
; 3. Check MD5 hash of both strings for true case-sensitive equality
; This ensures that strings like "AAA" vs "aaa" or "AAA" vs "AaB" are correctly detected as different
#define SameStr(str S1, str S2) \
  Len(S1) != Len(S2) ? 0 : \
  (S1 != S2 ? 0 : \
  (GetMD5OfString(S1) != GetMD5OfString(S2) ? 0 : 1))


Reply all
Reply to author
Forward
0 new messages