Skip to content
⌘ NSIS Forum Archive

Uncommenting a line in a file

2 posts

sandeepsirsgi#

Uncommenting a line in a file

Hi,

I had some files example A, and B which contains as follows

File A contains

rem set path=c:\programs
rem set classpath=c:\jdk
rem set env=d:\

File B contains

rem set path=c:\programs
rem set DBDRIVER=%PATH%\junit.jar
rem set classpath=c:\jdk

Where rem represents comment in batch file.
How to remove only the comment of classpath line in file A and comment of DBDRIVER line in file B.
Can anyone hep me on that.

Regards
Sandeep
Afrow UK#
This is a straight function to do it:

Just give it an empty string to replace the line with.

But the NSIS useful script headers should also produce a solution.

-Stu