cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

.ini file problem

I'd like to add just a keyword to a .ini file without the = sign
I'm using the INI file changes section in DevStudio

if I add a keyword e.g. "stopsign" without a value it just puts the following line into the .ini file.

stopsign=

I don't want the equals sign. just the word "stopsign".
any ideas?

cheers,
- P
(4) Replies
In that case, I don't think you can use INI File Changes view. Microsoft Windows Installer will append an equal sign, =, by default. You will have to write a custom action to add a keyword without an equal sign to an INI file.
OK, that worked. Just ended up writing a VB script to WriteLine to the .ini files at install finish.
cheers,
- P
Originally posted by BuurmanP
I'd like to add just a keyword to a .ini file without the = sign
I'm using the INI file changes section in DevStudio

if I add a keyword e.g. "stopsign" without a value it just puts the following line into the .ini file.

stopsign=

I don't want the equals sign. just the word "stopsign".
any ideas?

cheers,
- P


What you describe is file I/O, but it's not an INI file. As for custom action, thats the way to go, but make sure you test for various scenarios. I.E. if you uninstall does it remove stopsign. If yuo install multiple times does it create multiple stopsign. If stopsign already exist does it replace it or add to it? Just things to think about.

Typically the kind of file you see something like this is your hosts and services file or config.sys / autoexec.bat.
good point thanks, didn't think about the uninstall much. This software is "XILINX 6.1i SP3" (which is a tool for hard coding software into embeded systems)

It has an INI file for each chip type, which just has library locations in the INI file. Crappy designed software...

e.g.

[SymbolLibraries]
$(SCHDIR)
$(CWD)
$(XILINX)/spartan2/data/symbol/spartan2.lib

thanks,
- P