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.
Probably Simple for you guys
10 posts
SetOutPath sets where the file is installed, but you don't install any file. You need to use File to install a file.
not exactly sure what that means...
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
; 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
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
********************************
********************************************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
********************************
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
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
!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
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
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
Jon
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.
It should be executed under all circumstances because you don't have a components page.