|
|
#1 |
|
Junior Member
Join Date: Jul 2012
Posts: 16
|
Ideal way of reading IO ini file
I could do this:
code: or code: Both works, but what is the ideal way of reading Field 1's Name? I ask 'coz I hear many options in NSIS are deprecated these days. Also what difference it makes? I use code: to write values though.. |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Oct 2006
Posts: 1,840
|
You can actually answer this question yourself: Look in NSIS\Include\InstallOptions.nsh and see for yourself what the INSTALLOPTIONS_READ macro does, exactly.
(Moral of today's story: If you are interested in "What's best", don't just accept existing stuff the way it is. Instead, investigate how it works, and gain valuable experience and know-how from it.) |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jul 2012
Posts: 16
|
MSG, thanks for your valuable reply. I looked and found that they are identical. So both are just the same (I am too naive to know this beforehand. TBH, I do not know how a macro works. Nor written a macro myself
).Since both are identical, what is a more accepted coding practice? I think it is to call the macro (like !insertmacro read) than calling the function itself? |
|
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
The macros are there just to show that you are reading/writing InstallOptions INI files (and also so you don't need to prefix the INI file path with $PLUGINSDIR\).
You may as well just use them. Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
![]() |
|
|||||||
| Tags |
| deprecated, installoptions, macro, read, write |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|