I meant to use ResidualVM directly, instead of using D-Fend to launch it. I guess that D-Fend might be doing something weird that blocks the ini-file creation.
effectively launching ResidualVM directly makes the check only once.
I have tried to change the command line in D-Fend Reloaded to:
Command line parameters:
--config="G:\RESIDU~1\residualvm.ini" --path="G:\Vecchi giochi\LucasArts\Grim Fandango" --fullscreen --savepath="G:\Vecchi giochi\LucasArts\Grim Fandango\SAVES" grim
So I have added the "--config" parameter telling to write the .ini file in the same folder where ResidualVM.exe resides, but it doesn't help. The .ini file is written correctly in this folder (it contains only ResidualVM version section), but it doesn't contain the game section, so this is why the check is performed at every launch. It seems that ResidualVM won't write the game data when they are supplied on the command line, but it could be caused by other factors and not by ResidualVM itself.
Anyway, I can survive with this check