Old 22nd February 2011, 05:44   #1
giddy_guitarist
Junior Member
 
Join Date: Apr 2006
Location: Mumbai,India
Posts: 4
NSIS ExecWait returns 6 when trying to execute exe

Hi I have an annoying problem with NSIS.

I'm trying to write script to install the SaveAsPdfAndXps.exe plugin/addin for Office 2007.

Here is my script:
code:

Section "SaveAsPdf"
DetailPrint "Installing SaveAsPdfAndXps Extension"
File 'Prereq\SaveAsPDFandXPS.exe'
ExecWait '$TEMP\SaveAsPDFandXPS.exe' $0
DetailPrint "SaveAsPDFandXPS exit code = $0"
; Delete '$TEMP\SaveAsPDFandXPS.exe'
SectionEnd


So I'm running Windows 7 x64, I already have Office 07 with this extension installed. However, if I run the exe on my own by clicking it and installing it manually it doesn't abort it just installs nicely.

Now the above script, prints out exit code 6!? And the if I comment the Delete bit, I don't see the file in my temp directory? How do I find out whats going on?

The SaveAsPDFandXPS extension outputs a log file in the temp dir. if executed manually, but it doesn't happen with the script.

When the compiled setup executes, it does ask for elevation btw.

Regards,

Cross Posted on Stackoverflow:
giddy_guitarist is offline   Reply With Quote
Old 22nd February 2011, 06:01   #2
giddy_guitarist
Junior Member
 
Join Date: Apr 2006
Location: Mumbai,India
Posts: 4
Doi! I forgot to add :

SetOutPath '$TEMP'
giddy_guitarist is offline   Reply With Quote
Old 22nd February 2011, 06:04   #3
Highcoder
Member
 
Join Date: Jan 2011
Posts: 69
AFAIK exit code 6 is Error. Whats your instdir?
May you have to specify output dir

code:

Section "SaveAsPdf"
DetailPrint "Installing SaveAsPdfAndXps Extension"
SetOutPath $temp
File 'Prereq\SaveAsPDFandXPS.exe'
ExecWait '$TEMP\SaveAsPDFandXPS.exe' $0
DetailPrint "SaveAsPDFandXPS exit code = $0"
Delete '$TEMP\SaveAsPDFandXPS.exe'
SectionEnd

Highcoder is offline   Reply With Quote
Old 22nd February 2011, 06:06   #4
giddy_guitarist
Junior Member
 
Join Date: Apr 2006
Location: Mumbai,India
Posts: 4
yea! lol just saw it thanks so much! =)
giddy_guitarist is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
execwait, installer, nsis

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