Hello,
The way inifile driver is written removes comments after writing to the file. All the source code is available in the same directory. You can modify the source code so that it can preserve the comments.
Mika Fukuchi
Applications Engineer
National Instruments