Archive: Create bat files


Create bat files
Hi

Having some problems with things just outside the installer... trying to make a files connected to an installed program that are bat-files. The bat file should look like

JAVA_HOME=%1%
...
...
CLASSPATH=%5%

and so on

The problem is when I create a file and write to it with FileWrite I can't make any \n (newlines) and the bat file is damaged. The other way I tried is to call another bat file to create an new bat, but it seemed like the process didn't have any permission to create a file.

Any ideas?


Make up your batch file at home, with text in it and so on, then build it into your installer (using File x:\pathto\batch.bat) then extract the batch file when they run the installer, and you can use the replace text function on the nsis archive (http://nsis.sourceforge.net/archive/....php?pageid=17) to replace lines of text in the bacth file.
This is what I did - have lines labeled e.g. <bsp_compile_area> and that would be replaced with different command lines to an exe depending on which exe the user had selected.

-Stu


Hi behorn. :)

You should use $\r$\n to write newlines, not just $\n - that should do it.

Salaam/Peace.


problem solved
Thanx for the help, the $\r$\n trick did the job!


You're welcome, I'm glad to be of assistance. :)