|
|
#1 |
|
Member
Join Date: Jul 2003
Posts: 57
|
ReadINIStr is reading an overwritten file
On reinstalls, I am reading values from a newly re-written ini file and writing those values to an xml config file.
It appears that the call for: ReadINIStr $1 $INSTDIR\myinifile.ini Section Value is reading the depricated (overwritten) file. In debugging, I try blowing the old ini file away prior to writing a new one, but I still get similiar results in that NSIS can't see the newly created file so $1 = "" even though the file is there. The process of writing the ini file is not accessible to me, so do you suggest something like: ExecWait 'sleep (seconds)' would allow NSIS to 'catch-up' to the new file? This sounds odd, but I do notice that my debug MessageBoxes that I plant allow some time to pass and (seems like) the values can then be read correctly. |
|
|
|
|
|
#2 |
|
NSIS MUI Dev
Join Date: Nov 2001
Posts: 3,717
|
Try using FlushINI.
|
|
|
|
|
|
#3 |
|
NSIS Dev
Join Date: Feb 2003
Location: Boston, MA, U.S.A.
Posts: 455
|
I think you have to SendMessage WM_WININICHANGE.
I don't remember the details, but I am sure you can get them via Google. |
|
|
|
|
|
#4 |
|
Major Dude
|
iceman_k, what you said is for Win.ini file... Joost has the right answer.
|
|
|
|
|
|
#5 |
|
Member
Join Date: Jul 2003
Posts: 57
|
much appreciated, thanks for your help
mdm |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|