write user input to file.
Hi.
I have written this install script. i want to store the information that is entered by the user in a .cfm file, but i don't know how to do this.
at the moment the data is stored in an .ini file and this works fine.
maybe someone of you can help me.
  !include "MUI.nsh"
;General
;The name of the installer
Name "..."
;The file to write
OutFile "ac_install.exe"
;Default installation folder
InstallDir "$PROGRAMFILES\ac"
!define VERSION '0.2.3.8'
;--------------------------------
;Interface Settings
  !define MUI_HEADERIMAGE
  !define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\head.bmp" ; optional
  !define MUI_ABORTWARNING
;--------------------------------
;Pages
  !insertmacro MUI_PAGE_WELCOME
  !insertmacro MUI_PAGE_COMPONENTS
  !insertmacro MUI_PAGE_DIRECTORY
  !insertmacro MUI_PAGE_INSTFILES
  Page custom config
  !insertmacro MUI_PAGE_FINISH
  !insertmacro MUI_UNPAGE_WELCOME
  !insertmacro MUI_UNPAGE_CONFIRM
  !insertmacro MUI_UNPAGE_INSTFILES
  !insertmacro MUI_UNPAGE_FINISH
;--------------------------------
;Reserve Files
  ;These files should be inserted before other files in the data block
  ;Keep these lines before any File command
  ;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)
  ;ReserveFile "mysqlconfig.ini"
  ;!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
  !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
  ReserveFile "config.ini"
;--------------------------------
;Languages
  !insertmacro MUI_LANGUAGE "German"
;--------------------------------
;Installer Sections
Section "ac" ac
.
.
.
SectionEnd
Section "MYSql" mysql
.
.
.
SectionEnd
Section "Uninstall"
.
.
.
SectionEnd
Function .onInit
  InitPluginsDir
  !insertmacro MUI_INSTALLOPTIONS_EXTRACT "config.ini"
FunctionEnd
Function config
  !insertmacro MUI_HEADER_TEXT "MYSql Konfiguration" ""
  !insertmacro MUI_INSTALLOPTIONS_DISPLAY "config.ini"
  !insertmacro MUI_INSTALLOPTIONS_READ $0 "config.ini" "Field 4" "State"
  !insertmacro MUI_INSTALLOPTIONS_READ $1 "config.ini" "Field 5" "State"
  WriteINIStr "$INSTDIR\my.ini" "mysqld" "user" "$0"
  WriteINIStr "$INSTDIR\my.ini" "mysqld" "password" "$1"
FunctionEnd