Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: support the /S switch for restricted user accounts running silent installations #6

Merged
merged 18 commits into from Nov 21, 2012

Conversation

mikesteele81
Copy link
Contributor

The most recent released version does not fully support the /S switch. When a non-administrative user denies the UAC prompt, the following occurs:

  • An entry is placed in add/remove programs, but attempting to remove it yields an error message.
  • A shortcut is placed on the desktop and start menu with no icon.
  • Application files do not get placed anywhere.

With this branch much of the decision logic is moved out of NSIS pages. Default options are defined, and UI controls are set to mirror these. In cases where default options are invalid the silent installer will abort.

I've made an effort to preserve all existing behavior for normal installations. That said, this branch includes my previous pull request which changes the way the default installation location is chosen.

One remaining item for non-administrative users installing Zotero is that the uninstaller triggers a UAC prompt regardless of how Zotero was installed. I may send an additional pull request to fix this.

…ails.

Previously the Windows installer was intending to try each of the following
folders in turn until one with write access was found

Windows XP
----------

* c:\Program Files
* c:\Documents and Settings\All Users\Application Data
* c:\Documents and Settings\<current user>\Application Data

Windows 7
---------

* c:\Program Files or c:\Program Files (x86)
* c:\ProgramData
* c:\Users\<current user>\AppData\roaming

What was actually happening was that if the second path was checked for and
was found to be writable by the current user, then the 3rd option would be
chosen. If the current user did not have write access to the second path,
however, then that path would be chosen.

A user running the installer with administrative access should be able to put
programs in the first path. Should this not be the case, it would be better to
abort the installation rather than look for an alternate place to install the
software system-wide.

With this patch the behavior is as follows. First the installer will check
whether it has write access to the system wide location ("c:\Program Files" or
"c:\Program Files (x86)"). If this fails it will fall pack on a per-user
installation.
…nd on which version of Windows is installed.
simonster added a commit that referenced this pull request Nov 21, 2012
Windows: support the /S switch for restricted user accounts running silent installations
@simonster simonster merged commit e55bffc into zotero:master Nov 21, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants