- NSIS Discussion
- Probably Simple for you guys
Archive: Probably Simple for you guys
Joeddox
8th September 2007 20:21 UTC
Probably Simple for you guys
I haven't used nsis in about 2 years now I need to do the same thing I did before but I cann't remember how. :-(
This is what I have so far but it's not right. :-(
I just need to run the exe file but select where it is installed.
***********************
Name "Installer"
OutFile "installer.exe"
; The default installation directory
InstallDir $PROGRAMFILES\Example1
;--------------------------------
; Pages
Page directory
Page instfiles
;--------------------------------
; The stuff to install
Section "" ;No components page, name is not important
; Set output path to the installation directory.
SetOutPath $INSTDIR
SectionEnd ; end the section
Section
Exec '"$INSTDIR\jtpsetup.exe"
SectionEnd
*******************************************
Thanks for any help anyone can provide.
kichik
8th September 2007 20:32 UTC
SetOutPath sets where the file is installed, but you don't install any file. You need to use File to install a file.
Joeddox
8th September 2007 22:14 UTC
not exactly sure what that means...
JasonFriday13
9th September 2007 02:27 UTC
Yeah, where is 'jtpsetup.exe' in your installer? Should be something like:
; The stuff to install
Section "" ;No components page, name is not important
; Set output path to the installation directory.
SetOutPath $INSTDIR
;Extract the file
File "jtpsetup.exe"
SectionEnd ; end the section
Joeddox
9th September 2007 10:13 UTC
I got an error is this what you ment?
********************************************88
Name "Installer"
OutFile "installer.exe"
; The default installation directory
InstallDir $PROGRAMFILES\test
;--------------------------------
; Pages
Page directory
Page instfiles
;--------------------------------
; The stuff to install
Section "" ;No components page, name is not important
; Set output path to the installation directory.
SetOutPath $INSTDIR
; The stuff to install
Section "" ;No components page, name is not important
; Set output path to the installation directory.
SetOutPath $INSTDIR
;Extract the file
File "jtpsetup.exe"
SectionEnd ; end the section
********************************
ImBcmDth
9th September 2007 23:25 UTC
Name "Installer"
OutFile "installer.exe"
; The default installation directory
InstallDir $PROGRAMFILES\test
;--------------------------------
; Pages
Page directory
Page instfiles
;--------------------------------
; The stuff to install
Section "Install" ;Names are important for our sanity
; Set output path to the installation directory.
SetOutPath $INSTDIR
;Extract the file
File "jtpsetup.exe"
SectionEnd ; end the 'Install' section
; The stuff to execute
Section "Execute" ;Names are important for our sanity
Exec '"$INSTDIR\jtpsetup.exe"'
SectionEnd ; end the 'Execute' section
Joeddox
10th September 2007 00:11 UTC
!define: "MUI_INSERT_NSISCONF"=""
Changing directory to: "C:\Documents and Settings\Joel\Desktop\Cool Installer"
Processing script file: "C:\Documents and Settings\Joel\Desktop\Cool Installer\install.nsi"
Name: "Installer"
OutFile: "installer.exe"
InstallDir: "$PROGRAMFILES\test"
Page: directory
Page: instfiles
Section: "Install"
SetOutPath: "$INSTDIR"
File: "jtpsetup.exe" -> no files found.
Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
/oname=outfile one_file_only)
Error in script "C:\Documents and Settings\Joel\Desktop\Cool Installer\install.nsi" on line 24 -- aborting creation process
ImBcmDth
10th September 2007 00:45 UTC
The .exe has to be in the same directory as the .nsi file or you have to change the path to it in the File directive.
Jon
Joeddox
10th September 2007 04:16 UTC
Sorry I didn't have it in the right folder it works now but instead of running the exe its just copying to the fold the user chooses. I'm really trying to get it to run the exe after not just move it to the folder. Is there a way to do that? Thanks for the help so far.
JasonFriday13
10th September 2007 07:24 UTC
It should be executed under all circumstances because you don't have a components page.