BarSyr
Posts: 3
Joined: Wed Feb 26, 2025 11:23 am

Special character in [AppDataFolder]

We have an application that gets installed in the user\roaming folder.
So the [AppDataFolder] is that folder.
In this case it is:
C:\Users\exampleusér\AppData\Roaming\
See special character 'é' in usér.
In the files and folder section of AI, we add a .INI file and modify an entry in that ini-file with [AppDataFolder]
Now after installation of the application, we see the following in the .ini file:
C:\Users\exampleus?r\AppData\Roaming\
So the 'é' is changed to a '?'.
Because the application is installed in the users roaming folder, we can't prevent those characters.
How can this be solved ?
Catalin
Posts: 7504
Joined: Wed Jun 13, 2018 7:49 am

Re: Special character in [AppDataFolder]

Hello,

I have tested this and can confirm the behavior, which seems to be a MSI limitation, honestly.

The Windows Installer engine (MSI) stores data in its internal tables as UTF-16 Unicode, but when it writes to INI files, it uses ANSI encoding -specifically, the system code page (ACP) active at install time.

That means:

MSI --> converts Unicode --> ANSI (using the system’s current code page) when writing to an .ini file.

If the INI file needs to contain characters not representable in that code page, those characters will be mangled or replaced with "?" or similar placeholders.

This is a long-standing design limitation of MSI (not specific to Advanced Installer).

The only solution to this that I can think of would be to install the file as is and then modify it via a Custom Action (e.g. a PowerShell script) at the end of the installation.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”