Archive: How to show error which happens in InstallLib macro


How to show error which happens in InstallLib macro
I have problem with InstallLib macro. It works on one PC but doesn't on another. I dig a bit into this macro and found !error statements with explanation of an error happened.

I want to show this error with message box but I can't find the way to do it.

regards,
Roman


!error is a compile time instruction which will produce an error in MakeNSISW and end the compile procedure.

Stu


Can I get the inforation in !error prompted during runtime?

How can I figure out what error happened in macro (InstallLib)?

Are there ways to debug installer? Sometimes(I can't say exactly when or why) my installer crashes during installation/uninstallation dlls


If !error is executed, you don't get an installer so there is no runtime. !error allows the script to tell the compiler something went wrong and that it "doesn't wish" to be compiled further. The only information you get is what the compiler outputs, which is the string that was passed to !error.


Where can I get the string in !error?
Will it be shown in details?

p.s. what about InstallLib debuging?


The compiler output contains the string passed to !error. For example, a simple script that contains only the following:

!error "testing !error message"
Will result in:
!error: testing !error message
Error in script "test.nsi" on line 1 -- aborting creation process
If your installer crashes, it's most probably a problem with your DLL. Unless the details show the crash happened in the main module - the installer itself, it's in the DLLs.