Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 16th June 2004, 16:30   #1
mdm
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.
mdm is offline   Reply With Quote
Old 16th June 2004, 18:22   #2
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
Try using FlushINI.
Joost Verburg is offline   Reply With Quote
Old 16th June 2004, 18:24   #3
iceman_k
NSIS Dev
 
iceman_k's Avatar
 
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.

Cheers,
Iceman_K

EclipseNSIS - An NSIS IDE for the Eclipse Platform | My contributions to the wiki
iceman_k is offline   Reply With Quote
Old 17th June 2004, 01:55   #4
deguix
Major Dude
 
deguix's Avatar
 
Join Date: Dec 2002
Location: Everett - MA, USA
Posts: 1,353
Send a message via ICQ to deguix
iceman_k, what you said is for Win.ini file... Joost has the right answer.

My Wiki Pages

Working now on:
New projects. (language: any)
deguix is offline   Reply With Quote
Old 17th June 2004, 14:26   #5
mdm
Member
 
Join Date: Jul 2003
Posts: 57
much appreciated, thanks for your help
mdm
mdm is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump