While preparing an MSI for enterprise deployment of pidgin-otr, I found that the (un)installer does not honor the NSIS "/S" switch for unattended (un)installation, causing the uninstall confirmation prompt to appear when running 'pidgin-otr-uninst.exe' and other prompts when performing upgrades or errors occur.

This does not cause issues during the initial installation of pidgin-otr, but subsequent updates will fail due to there being no user interface available when the MSI is uninstalled via Group Policy (after Windows boots, before users are given the ability to log on, MSIs for old versions are removed and the new versions' MSIs are then installed [no in-place updates are performed]).

The culprits lie on the following lines within 'packaging/windows/pidgin-otr.nsi':
======
127 MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." 131 MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2 162 MessageBox MB_OK|MB_ICONINFORMATION "Could not find pidgin plugin directory, pidgin-otr.dll not uninstalled!" IDOK ok 180 MessageBox MB_OK|MB_ICONINFORMATION "pidgin-otr.dll is busy. Probably Pidgin is still running. Please delete $PidginDir\plugins\pidgin-otr.dll manually." 194 MessageBox MB_OK|MB_ICONINFORMATION "Failed to find Pidgin installation." 207 MessageBox MB_OK|MB_ICONEXCLAMATION "pidgin-otr was already found on your system and will first be uninstalled" 216 MessageBox MB_OK|MB_ICONEXCLAMATION "Uninstall failed or aborted" 238 MessageBox MB_RETRYCANCEL "pidgin-otr.dll is busy. Please close Pidgin (including tray icon) and try again" IDCANCEL cancel
======
These are all the MessageBox calls that are not commented out within the .nsi file.

There are two ways to address this:
1) add the "/SD" value (see http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.4.15 ) to each MessageBox call, to specify what option to choose by default when the installer is running silently (This would be good for MessageBox-es that offer a choice that alter the script execution path, a safe default would be to choose the button which aborts the [un]installation process*)

and/or

2) Put a IfSilent (see http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.4.12 ) jump before each MessageBox call (with a proper jump value to preserve the execution path) to skip the display of the message and continue script execution. (This would be good for MessageBox-es that simply display information and make no script branching decisions)

* Alternatively the method described in http://nsis.sourceforge.net/Docs/Chapter4.html#4.12 can be used to provide the MessageBox answer desired by the user for each possible choice.

--
Ariel Poliak
Network and Security Operations
Active Directory Administrator
HostDime.com, Inc.


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
OTR-dev mailing list
[email protected]
http://lists.cypherpunks.ca/mailman/listinfo/otr-dev

Reply via email to