Capture errors during Silent Install NSIS? - nsis

For NSIS installer with UI, we can see the error as a popup while doing the installation.
But how about Silent install. How do we know if an error happened during silent install ? Is there an error handler that we can make use of ?

Inside the installer: IfErrors and/or .onInstFailed.
Outside of the process: The process exit code is not 0 (1 is usually user abort).

Related

Installshield on the second install returns -3 in silent mode

The scenario is when the same package being installed again in silent mode it returns -3(first time is 0) which is unwanted because the package will block other ones from proceeding.
I think the reason is that setup.iss file only specifies the UI operations for the very first installation, but when the same package being ran again the UI is for uninstall, so that rule doesn't match and -3 was returned.
I'm thinking adding logic into setup.iss to handle both the install and uninstall UI conditionally to simply just ignore the second install attempt so that 0 will be returned instead of -3 so the whole installation process will continue.
Update:
start /wait Setup.exe /s /f1C:\path\to\setup.iss with %errorlevel% = 0
start /wait Setup.exe /s /f1C:\path\to\uninstall.iss with %errorlevel% = -3 but the program seems to be uninstalled completely.
Uninstall.iss:
[{1E0559A1-9644-40EF-B7B7-000000001386}-DlgOrder]
Dlg0={1E0559A1-9644-40EF-B7B7-000000001386}-MessageBox-0
Count=2
Dlg1={1E0559A1-9644-40EF-B7B7-000000001386}-SdFinishReboot-0
[{1E0559A1-9644-40EF-B7B7-000000001386}-MessageBox-0]
Result=6
[{1E0559A1-9644-40EF-B7B7-000000001386}-SdFinishReboot-0]
Result=1
BootOption=0
here,
[{1E0559A1-9644-40EF-B7B7-000000001386}-MessageBox-0]
Result=6
doesn't seem to be a valid entry, because according to the manual MessageBox should only have Result of 1 which is the OK button, but here is 6. But this response file was recorded not manually generated.
Is it possible that this entry should be a custom dialog instead of a messagebox and should be treated as such and this is the cause of ResultCode=-3?
Thanks,

Error during installion of Jolie

Error during the installion of Jolie.
I see the following message after the execution of
$ java -jar jolie-1.4.1.jar
[Windows_installer.ol] Thrown unhadled fault: FileNotFound
[installer.ol] Internale server error
The installer needs permission to write in the directories in which you intend to install Jolie. That error typically shows up when the installer is launched from a terminal without administrator privileges.
Did you launch the installer from a Command Prompt as an Administrator?

Installshield Silent Uninstall passing command line argument

i have a exe which will be uninstalled only upon passing a commandline argument "uninstall". i would like to create a response file for uninstalling this exe by passing the argument and do my uninstallation silently. Is it possible?
I have created a Installscript Project and Install it silently, when i install it as silent then remove and change button are disable in control panel. can you let me know how can be enable these button . no matter weather it is silent uninstallation or simple uninstallation.
thanks

How can I make my NSIS silent installer block until complete?

When I run a silent NSIS installer (from the console, as in installer.exe /S /D=C:\Foo) it immediately moves to the background. I'd like to wait until it has finished installing before I do anything else. Is there a flag I can pass to tell the installer to be blocking?
You don't say anything about how you start the process in your question! NSIS installers are always "blocking", for a silent installer this means you just have to wait for the child process to end.
If the parent process is also a NSIS installer you can do ExecWait '"c:\path\to\installer.exe" /S /D=C:\Foo' or if it is a batch file you must use start "" /WAIT "c:\path\to\installer.exe" /S /D=C:\Foo

NSIS Silent Install changing default options

I have a third party application I would like to silent install from the command line.
The application is PPLive available at: http://www.pptv.com/en/
It is an NSIS installer, and currently when silently installed, installs toolbars, and additional pieces of software, launches on completion etc.
Without repackaging it, how do I control the checkbox options on the pages of the normal installer from the silent command line install.
Is it even possible?
NSIS supports the silent install option with the /S command line script, however, it only sets a flag that the install script can check:using IfSilent.
There is an example script here that demonstrated a silent installation.
You can't control the components unless the installer has been coded specifically for it (By using a "answer" file/.ini or some parameter you pass on the commandline) NSIS itself only allows the author of the installer to know if it is in silent mode or not, the rest is up to them. You would have to ask the PPLive people about it (Or request that they add it if they don't support it already)

Resources