Old 13th September 2007, 19:02   #1
nicolasneumann
Junior Member
 
Join Date: Sep 2007
Posts: 2
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

Last edited by nicolasneumann; 13th September 2007 at 20:36.
nicolasneumann is offline   Reply With Quote
Old 13th September 2007, 23:17   #2
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,917
What's UWA? If is a folder, try wildcards..
code:

File /r UWA\*.*



* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE.
Joel is offline   Reply With Quote
Old 14th September 2007, 04:23   #3
nicolasneumann
Junior Member
 
Join Date: Sep 2007
Posts: 2
"UWA" is the folder i want to copy (with all its content)
nicolasneumann is offline   Reply With Quote
Old 14th September 2007, 17:46   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump