SourceForge has been redesigned. Learn more.
Close

#215 Windows Installer: Allow silent install

closed
None
5
2008-11-19
2008-10-28
Kai Pastor
No

For automatic deployment to Windows machines, it would be nice if silent install would work. There are two problems at the moment:

1. You need to specify the /SD option to MessageBox. There are message boxes without default action for silent mode. While the install is silent in most cases (no existing installation), the uninstaller always shows message boxes.

Example with /SD:

Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." /SD IDOK
FunctionEnd

Function un.onInit
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" /SD IDYES IDYES +2
Abort
SetShellVarContext all
FunctionEnd

2. Icons must be installed to the "All Users" many when installation is executed with administrative privilege.
You need to call
SetShellVarContext all
in ...onInit.

Example:
http://jabref.svn.sourceforge.net/viewvc/jabref/trunk/jabref/src/windows/nsis/setup.nsi

In the JabRef nsi file, there is a macro IsUserAdmin for testing for administrative privileges. Maybe this can be reused.

Thank you,
Kai Pastor.

Discussion

  • Enrico Tröger

    Enrico Tröger - 2008-11-19

    Thank you a lot for your suggestions.
    I changed the MessageBox calls to use the /SD argument and silent installations seem to work fine for now.

    I also added 'SetShellVarContext all' but didn't test it, hope it works.

    About the IsUserAdmin stuff: I left this out for now, maybe I'll get to this later or someone wants to provide a patch.

     
  • Enrico Tröger

    Enrico Tröger - 2008-11-19
    • assigned_to: nobody --> eht16
    • status: open --> closed
     

Log in to post a comment.