Archive: Edit and Run Batch File


Edit and Run Batch File
Hi, I want to use an installer to ask a user for a series of parameters, with the installer then writes into the appropriate place in a batch file. Then I want the batch file to be run.

I have searched the forums and user manual and can only find how to execute the batch file. Can anyone help me to ask the user for the paramaters and then write them into the batch file?

Thanks in anticipation.


You can use FileOpen, FileWrite, and FileClose to create a BAT file. As for asking the user for parameters, I suspect you'll need to use InstallOptions to create a custom page, but I haven't had much experience doing that, and someone else will likely be able to help you with that.


you can do the same thing with the Exec command :)
so you don't need to create a batch file.


You should be able to do everything in a batch file using NSIS commands. However, if you need the batch file for more than just the installation, then there are many text file manipulation functions on the NSIS Archive.

-Stu