|
|
#1 |
|
Junior Member
Join Date: Jul 2009
Posts: 5
|
Hi all, I've recently, for the first time, started working on an installer using NSIS. I've managed to create installer but I have problem when I try to start it from the command line (silent install).
I know, I have to put /S to be able to install it silently. I'm using this function: code: for getting command line parameters. Problem is that all of a sudden installer aborts on this line: code: Here is a part of the code: code: Before this point, I also have this function called: code: Strange thing is that I have called StrCmp function couple of times before this. Function code: is used for logging. I have put so many LogText statements for debugging reasons. All the code I wrote here is located in .onInit function. I don't know if that means something. I'm really confused what is wrong here, if anyone knows what is the problem, please tell me. If you want more detail fill free to ask. |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Your logic is messed up to start with. Even if you don't specify a password your script will print a message and then continue! Use LogicLib and if needed call Abort.
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jul 2009
Posts: 5
|
Actually, this is what I did, I deliberately altered code like this because I didn't wanted to Abort. That is why I changed Abort calls on lines 4 and 12 with ${LogText} calls. And instead of jumping on label continue I made a relative jump +2. That is, now I don't abort on mistake but rather log it. Problem is that on the line which I marked with comment, installer script aborts, without any reason logical to me.
|
|
|
|
|
|
#4 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Could you produce a script that reproduces the problem?
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jul 2009
Posts: 5
|
No. Actually, I have two other similar scripts (almost the same) and they are working flawlessly. That's why I am so confused. I think problem is hidden somewhere in this script, but I just can't find it. To create all these scripts I used wizard from the NSIS plug-in for Eclipse. I created a MUI2 installer, if that is important. I just thought that someone maybe had similar problem. I don't have that script with me now, but I'll attach it tomorrow. Maybe you or someone else can spot the error.
BTW, thanks for quick replay. |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Mar 2006
Location: Dallas
Posts: 442
|
Macros do not count as a single line. If your macro LogText has multiple lines then this
will be jumping someplace inside the macro. You should either use LogicLib or add specific labels and put those on the StrCmp. LogicLib would really be a better choice, in my opinion.code: Doncode: |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Jul 2009
Posts: 5
|
Hmmm... That sounds interesting. I'll try it tomorrow. Thank you, too.
|
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Jul 2009
Posts: 5
|
Sorry for late reply, demiller9, you were right, macros were my problem. I've solved it, thanks to you and Afrow UK.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|