Hi Alex,
Thanks for the extra details.
In your screenshot you’re still calling GetVolumeInformationA.
That’s the ANSI variant. With the current Inno Setup you should
stick to the Unicode API versions instead, so GetVolumeInformationW
and String parameters. Mixing String with the A functions is what
causes garbled text.
Also, you’re right: there’s no PChar anymore (I misremembered).
PChar/PAnsiChar were just aliases for AnsiString and not actually
pointers. In other words, they had no real use and were just
confusing.
Using only String (and the Unicode/W APIs) is the right direction
for current scripts.
The GetVolumeInformation call is made when the installer runs, not
at build time. So the “writing the installer to a USB drive as part
of the build process” wouldn’t explain why you're using it. (Was
asking just out of curiosity.)
Calling ExitProcess to abort is pretty blunt and can cause side
effects. There are cleaner ways to abort or refuse to continue
depending on what you need.
None of this is related to ANSI vs UTF-8, at all.
Greetings,
Martijn
Op 19-12-2025 om 20:46 schreef Alex
Polmans: