Howto write INI settings without a value?
Hi.
I need to write something like this:
***91;section***93;As you can see, there is no "=" or a value. How can I handle this?
>ENTRYNAME
>
Thanks,
Denis
Archive: Howto write INI settings without a value?
Howto write INI settings without a value?
Hi.
I need to write something like this:
***91;section***93;As you can see, there is no "=" or a value. How can I handle this?
>ENTRYNAME
>
Try in this way
ReadINIStr $0 File.ini SECTION ENTRYNAME
IfErrors 0 iniExist
WriteINIStr File.ini SECTION ENTRYNAME ""
iniExist:
Bye
Hm, wouldn't it write it this way then:
***93;
>ENTRYNAME=
You cannot write it without the =. You will have to manipulate the file using FileOpen, FileRead, FileWrite and FileClose.
Stu
Originally posted by Afrow UKThanks for your reply.
You cannot write it without the =. You will have to manipulate the file using FileOpen, FileRead, FileWrite and FileClose.
Stu
According to WritePrivateProfileString, if you specify NULL lpString for it will delete the entire key. You can have a look at the API here: http://msdn.microsoft.com/en-us/library/ms725501(VS.85).aspx
I cannot see any reference to creating keys without an =.
The File* are in the documentation. Search the forums as well.
Stu
you can do:
writeinistr "$temp\file.ini" section "name$\r$\n;dummy" ""
but that is hacky as hell and only works once for each section and you get alot of dummy entries
I'm pretty sure you can't write without a = with the win api
Originally posted by AndersThanks Anders. This would be a workaround for my problem I guess. I will talk to the devs about my problem.
you can do:
writeinistr "$temp\file.ini" section "name$\r$\n;dummy" ""
but that is hacky as hell and only works once for each section and you get alot of dummy entries
I'm pretty sure you can't write without a = with the win api