krisbabu
10th July 2003 14:34 UTC
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
kichik
10th July 2003 14:39 UTC
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"'
krisbabu
10th July 2003 14:55 UTC
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
kichik
10th July 2003 14:59 UTC
What error?
krisbabu
11th July 2003 06:35 UTC
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
kichik
11th July 2003 11:36 UTC
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.
krisbabu
18th July 2003 09:08 UTC
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