Old 8th September 2007, 19:21   #1
Joeddox
Junior Member
 
Join Date: Sep 2007
Posts: 5
Unhappy 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.
Joeddox is offline   Reply With Quote
Old 8th September 2007, 19:32   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
SetOutPath sets where the file is installed, but you don't install any file. You need to use File to install a file.

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
Old 8th September 2007, 21:14   #3
Joeddox
Junior Member
 
Join Date: Sep 2007
Posts: 5
not exactly sure what that means...
Joeddox is offline   Reply With Quote
Old 9th September 2007, 01:27   #4
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 916
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

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Old 9th September 2007, 09:13   #5
Joeddox
Junior Member
 
Join Date: Sep 2007
Posts: 5
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
********************************
Joeddox is offline   Reply With Quote
Old 9th September 2007, 22:25   #6
ImBcmDth
Junior Member
 
ImBcmDth's Avatar
 
Join Date: Aug 2007
Location: New Jersey
Posts: 17
Send a message via AIM to ImBcmDth
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
ImBcmDth is offline   Reply With Quote
Old 9th September 2007, 23:11   #7
Joeddox
Junior Member
 
Join Date: Sep 2007
Posts: 5
!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
Joeddox is offline   Reply With Quote
Old 9th September 2007, 23:45   #8
ImBcmDth
Junior Member
 
ImBcmDth's Avatar
 
Join Date: Aug 2007
Location: New Jersey
Posts: 17
Send a message via AIM to ImBcmDth
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
ImBcmDth is offline   Reply With Quote
Old 10th September 2007, 03:16   #9
Joeddox
Junior Member
 
Join Date: Sep 2007
Posts: 5
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.
Joeddox is offline   Reply With Quote
Old 10th September 2007, 06:24   #10
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 916
It should be executed under all circumstances because you don't have a components page.

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 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