Old 2nd June 2007, 07:15   #1
rmccue
Member
 
Join Date: Aug 2005
Location: Australia
Posts: 71
ExecWait doesn't work on any NSIS installer

On my computer, ExecWait doesn't bother executing the specified executable, returns nothing but sets the error flag.
This happens on all apps which use ExecWait (possibly Exec and ExecShell too).
Does anyone have any ideas?
rmccue is offline   Reply With Quote
Old 2nd June 2007, 07:50   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
The main idea is that ExecWait does not find a valid path/file name to execute.

Alternate there are command line parameters that need a correct quotation.

Possible other ideas too, could you post a minimal sample code?

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 2nd June 2007, 07:55   #3
rmccue
Member
 
Join Date: Aug 2005
Location: Australia
Posts: 71
Quote:
Originally posted by Red Wine
The main idea is that ExecWait does not find a valid path/file name to execute.

Alternate there are command line parameters that need a correct quotation.

Possible other ideas too, could you post a minimal sample code?
I have verified in all instances that the file exists and is being called correctly.

The following code does not work:
code:
OutFile "File.exe"
Section
ExecWait "$EXEDIR\Test.exe"
SectionEnd

rmccue is offline   Reply With Quote
Old 2nd June 2007, 08:02   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
You must quote the path.
code:
ExecWait '"$EXEDIR\Test.exe"'

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 2nd June 2007, 08:05   #5
rmccue
Member
 
Join Date: Aug 2005
Location: Australia
Posts: 71
Quote:
Originally posted by kichik
You must quote the path.
code:
ExecWait '"$EXEDIR\Test.exe"'
Is this only a requirement as of a recent release, or has this always been the case?
I assume it is only in recent versions, as I have been able to successfully execute before, using only double quotes.
rmccue is offline   Reply With Quote
Old 2nd June 2007, 08:10   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
It's a requirement of Windows. Sometimes it manages to figure out alone that any spaces that may be in the path are not separators of arguments, but sometimes it fails. This can happen, for example, if you have "C:\Program.exe" while trying to execute "C:\Program Files\Something.exe". In this case, it'll think "Files\Something.exe" is an argument for "C:\Program.exe".

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 2nd June 2007, 08:13   #7
rmccue
Member
 
Join Date: Aug 2005
Location: Australia
Posts: 71
So this should work too?
code:
ExecWait `"$EXEDIR\Test.exe"`
rmccue is offline   Reply With Quote
Old 2nd June 2007, 08:40   #8
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
Assuming Test.exe really is in $EXEDIR, it should work.

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 2nd June 2007, 08:43   #9
rmccue
Member
 
Join Date: Aug 2005
Location: Australia
Posts: 71
OK, thanks Kichik!
I might be back with another problem regarding this though...
rmccue 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