Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   problem with WriteINIStr and DeleteINISec (http://forums.winamp.com/showthread.php?t=252477)

OsmanY22 2nd August 2006 14:54

problem with WriteINIStr and DeleteINISec
 
Hi...

I have a problem!
I would like to enter a path in a document. However goes only through a section_name! I would like to however again delete this section_name!

If I use then DeleteINISec, it deletes me not only section_name, but also entry_name.

The reason is: I have a .bat-file, which I would like to change. However it indicates then in the MS-DOS an error, if I open it. Because the section_name is still in it.


Can someone please help me??

WriteINIStr "$INSTDIR\ms_oc4j.bat" "SecMAGICK_HOME" "set MAGICK_HOME" "$INSTDIR\bin"
WriteINIStr "$INSTDIR\ms_oc4j.bat" "SecINSTDIR " "set INSTDIR" $INSTDIR

by

Afrow UK 2nd August 2006 15:02

Use FileOpen, FileWrite and FileClose to write to batch files.
Or use ConfigWrite which is in one of the NSIS useful headers.

-Stu

OsmanY22 2nd August 2006 15:08

The batch file is exist!

And i want to change some of the lines! Not all!

ConfigWrite doesn't exist on my eclipse installer?!

Why?


(my english is not very good ... sorry ;) )

Afrow UK 2nd August 2006 15:13

See the NSIS documentation > Useful Headers

-Stu

OsmanY22 2nd August 2006 15:29

thx...

but i have another problem:
the funktion FileOpen, FileWrite and FileClose is very good ... but how can i write in a batch at the 5.line?



example:
Text of a batch:
set PATH=C:\Dokumente und Einstellungen\oy\workspace\Primes\bin
set MAGICK_CODER_MODULE_PATH=C:\Dokumente und Einstellungen\oy\workspace\Primes\bin\modules\coders
set MAGICK_HOME=C:\Dokumente und Einstellungen\oy\workspace\Primes\bin

How can i cange "set MAGICK_HOME=C:\Dokumente und Einstellungen\oy\workspace\Primes\bin" to "set MAGICK_HOME=C:\Programm\MAGICKHOME\bin"?


I use this function:

ClearErrors
FileOpen $3 $INSTDIR\ms_oc4j.bat a
IfErrors done
FileWrite $3 "set JAVA_HOME=$INSTDIR"
FileClose $3


thx

Afrow UK 2nd August 2006 15:34

http://nsis.sourceforge.net/Write_to...le_line_number

-Stu

OsmanY22 3rd August 2006 07:53

thx a lot!!!!!


All times are GMT. The time now is 05:10.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.