Skip to content
⌘ NSIS Forum Archive

File not found error

6 posts

thieldn#

File not found error

I am writing a simple installer that I thought would be quick, but I have run into a problem that I can't seem to get around. one of the files I am trying to install is not recognized by the compiler and gives a file not found error.

Processing script file: "C:\Documents and Settings\Daniel Thiel\Desktop\Cartesia installer\CartesiaInstaller.nsi"
Name: "CartesiaInstaller"
OutFile: "Cartesia_Installer.exe"
InstallDir: "$PROGRAMFILES\Cartesia"
InstallRegKey: "HKLM\Cartesia\Install_Dir"
Page: components
Page: directory
Page: instfiles
UninstPage: uninstConfirm
UninstPage: instfiles
Section: "Cartesia (required)"
SetOutPath: "$PROGRAMFILES\java\jre1.5.0_09\lib"
File: "javax.comm" -> no files found.
Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
/oname=outfile one_file_only)
Error in script "C:\Documents and Settings\Daniel Thiel\Desktop\Cartesia installer\CartesiaInstaller.nsi" on line 45 -- aborting creation process

Below is the code, all the other files are located in the same place and install correctly, but the javax.comm will not .

Section "Cartesia (required)"

;SectionIn RO

;write javax.comm
setOutPath $PROGRAMFILES\java\jre1.5.0_09\lib
;put the file there
File javax.comm <-- THIS IS THE PROBLEM LINE

; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
File cartesia.jar

;set output path for lib dir
SetOutPath $INSTDIR\lib
;put file there
File comm.jar

;write win32com.dll
setOutPath $PROGRAMFILES\java\jre1.5.0_09\bin
;put the file there
File win32com.dll

; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\Cartesia "Install_Dir" "$INSTDIR"

; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cartesia" "DisplayName" "Cartesia"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cartesia" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cartesia" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Cartesia" "NoRepair" 1
WriteUninstaller "uninstall.exe"

SectionEnd

any help appreciated.
Red Wine#
Does this file exist into the same folder where the compiling script resides? If not, you should add the full path to the local file. Is the filename correct?
thieldn#
All the files reside in the same file as the script, and they all compile fine except for javax.comm. At first I thought maybe it was due to a 4 character extension, but I changed it to 3 chars and it still had problems. This is my first script, so I am expecting it to be something simple on my part, but so far I can't figure it out.
thieldn#
I knew it was something simple. While the file name was javax.comm, on a hunch I turned show extensions on and saw javax.comm.properties. Problem solved. Thanks for the idea and input.