Old 10th July 2003, 13:34   #1
krisbabu
Junior Member
 
Join Date: Feb 2003
Location: India
Posts: 12
using NSIS to install windowsInstaller

Hi..

I have a problem with my installer. I want to install mycomponent.msi(windowsInstaller) .is it possible?.

Am using the flg command and it throws error.

Exec "${MSIExecPaht}msiExec /q /i "License.msi" TargetDIr = "$InSTDir"

Bye
Krisbabu
krisbabu is offline   Reply With Quote
Old 10th July 2003, 13:39   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
You have a problem with the quotes. Use ' as the outer quote and it should be OK. You should also quote the path to the executable just in case it contains spaces. So the line should look like this:

Exec '"${MSIExecPath}msiExec" /q /i "License.msi" TargetDir = "$INSTDIR"'

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 10th July 2003, 13:55   #3
krisbabu
Junior Member
 
Join Date: Feb 2003
Location: India
Posts: 12
Hi kichek..
The code that i used Exactly the one u suggested,But still it thro' error.I tried using nsExec::Exec '"${MSIExecPath}msiExec" /q /i "License.msi" TargetDir = "$INSTDIR"' too,but it's return value was Error.
Thanks for ur reply
krisbabu
krisbabu is offline   Reply With Quote
Old 10th July 2003, 13:59   #4
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
What error?

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 11th July 2003, 05:35   #5
krisbabu
Junior Member
 
Join Date: Feb 2003
Location: India
Posts: 12
Unhappy

hi kichek..
it gave the return as error and i didn't get any more information.

here is my code:
Exec '"${MSISEXECPATH}msiExec" /q /i "License.msi" TARGETDIR = "$INSTDIR"'
pop $0 #return value/error/timeout
DetailPrint "Return value $0"

Here
${MSISEXECPATH} -> msiExec path
TARGETDIR = $INSTDIR" -> is parameter so that i can send targetdir, which is defined in License.msi
Thanks
krisbabu
krisbabu is offline   Reply With Quote
Old 11th July 2003, 10:36   #6
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
That's not how you get the return value. Exec doesn't return any return value because it doesn't wait for the program to finish. Only ExecWait and nsExec return the return value. With ExecWait you specify the output variable in another parameter and only with nsExec you pop it from the stack.

First of all make sure ${MSISEXECPATH} has an ending back-slash so the path is completely right (you can also just output "${MSISEXECPATH}msiExec"), next make sure it can find License.msi. If License.msi is not in the current working directory ($EXEDIR or $OUTDIR if SetOutPath was used) then either specify a full path or set the current working directory (using SetOutPath) to the directory of License.msi.

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 18th July 2003, 08:08   #7
krisbabu
Junior Member
 
Join Date: Feb 2003
Location: India
Posts: 12
Hi,
I got it.The mistake was with the coding.There was extra Space.It is like this

Exec ' "${MSIExecPath}msiExec" /q /i "License.msi" TargetDir = "$INSTDIR" '

Now it is as follows:


ExecWait Exec '"${MSIExecPath}msiExec" /q /i "License.msi" TargetDir = "$INSTDIR"' - No Space bt ' and "
Thanks
Krisbabu
krisbabu 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