Skip to content
⌘ NSIS Forum Archive

error opening file for writing

4 posts

nicolasneumann#edited

error opening file for writing

first i want to say sorry!!

i am total new to createing installers.
i tried to make an installer that copies 2 folders (from the cd) to the programmfiles.

i used the "example1.nsi" file from the example folder.
there i named the file to write, the install directory.

in "pages" i didnt do anything.

and under the stuff to install i added "file /r"

now when i run the "installer.exe" i cant install because i get the message "error opening file for writing".

i could not find (or understand) any further hints in the manual and in the faq... 🙁


;--------------------------------

; The name of the installer
Name "UWA"

; The file to write
OutFile "Install.exe"

; The default installation directory
InstallDir c:\Programme\UWA_Test

;--------------------------------

; Pages

Page directory
Page instfiles

;--------------------------------

; The stuff to install
Section "" ;No components page, name is not important
File /r UWA

; Set output path to the installation directory.
SetOutPath $INSTDIR\UWA

; Put file there
File example1.nsi

SectionEnd ; end the section





thanks for any hint
kichik#
You must first use SetOutPath and only then use File or else it won't know where to put the files and will fail, just as it fails in your case.