Old 9th April 2002, 17:03   #1
qman
Junior Member
 
Join Date: Apr 2002
Posts: 1
Newbie question

Hi
I would like to modify my execute.bat file by installer after everything was installed. I am using .onInstSuccess function to call FileOpen with "a" mode, followed by FileWrite. I would like my new line to be inserted at the begining of the file. Unfortunately, it overwrites anything i have at the begining (based on the lenght of the line i want to insert). Is there a better way of doing it?
thank you
qman is offline   Reply With Quote
Old 9th April 2002, 17:08   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Hi qman!

All you need to do is to write your line to a new file, then read the old file and write its contents into the new file, close it, and replace the old file with the new file.

KiCHiK
kichik is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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