DarkLord23
19th February 2002 13:11 UTC
Create a file
Hello,
Here is what I want to do. During installation process, I have copied a file called install.bat on the INSTDIR. This file is empty.
I would like to open it and add the following content
SET CLASSPATH=$INSTDIR\lib\econf.jar
java be.ac.fundp.infonet.econf.installer.Install $INSTDIR
Close the file and then call it. Would it be possible?
Regards,
Stephane
DarkLord23
19th February 2002 13:57 UTC
Ok something is easier for me. How can you write
" in a command
for instance I want to show Hello "World!"
How can we do this?
hasty
24th February 2002 00:40 UTC
How about:
FileOpen $R0 "$INSTDIR\install.bat" a
FileSeek $R0 0 END
FileWrite $R0 "SET CLASSPATH=$INSTDIR\lib\econf.jar"
FileWrite $R0 "java be.ac.fundp.infonet.econf.installer.Install $INSTDIR"
FileClose $R0
ExecWait "$INSTDIR\install.bat"
-H
cchian
24th February 2002 03:12 UTC
When using FileWrite, how do you tell it to start the next instance of FileWrite in a new line?
When I use the following code:
FileWrite $R0 "@echo off"
FileWrite $R0 "cls"
I end up with "@echo off" and "cls" on the same line.
-Carlos
hasty
24th February 2002 07:28 UTC
$\r$\n, under Windows at least.
So the above example probably should have been:
FileOpen $R0 "$INSTDIR\install.bat" a
FileSeek $R0 0 END
FileWrite $R0 "SET CLASSPATH=$INSTDIR\lib\econf.jar$\r$\n"
FileWrite $R0 "java be.ac.fundp.infonet.econf.installer.Install $INSTDIR$\r$\n"
FileClose $R0
ExecWait "$INSTDIR\install.bat"
DarkLord23
24th February 2002 11:21 UTC
Thanks!!!!!
Now i would like to monitor the response code and open a message box different
if errorcode=1 then MB_OK "Installation complete"
if errorcode=2 then MB_OK "An error occured ..."
:D