zotero/zotero-standalone-build — pull request #27 by mikesteele81 (2013-04-16 22:09:31+00:00)
Title: Windows installer: global vs. per-user installations

# Summary
This branch gives users the option of performing a per-user or global installation by selecting a radio checkbox on a new page of the installer.

![687474703a2f2f6d69636861656c737465656c652e75732f636f6e74656e742f6d656469612f696d616765732f36444443353046414241374444333631424143444330454442463838373533372e706e67](https://f.cloud.github.com/assets/89937/388635/b98c686e-a6df-11e2-824c-0b9291e01222.png)

# Silent installers

If the installer is launched silently (using an /S switch) it will select either a global or per-user installation based on whether the installer is running with an administrative token.

The previous behavior was for the installer to trigger a UAC prompt if it was not started with administrative permissions. The new behavior is for a per-user installation to be performed in this case.

# UAC prompts

Zotero's Windows installer currently prompts for administrative credentials as soon as it starts. If the user is an administrator, then rejecting the UAC prompt will cancel the installation. If the user is a standard account, then rejecting the UAC prompt will perform a per-user installation. It is not possible for an administrative user to perform a per-user installation.

With this branch UAC prompts are delayed until a global installation is selected on the "scope options" page. The installer will then restart with administrative credentials.

Should the installer be run with administrative credentials to begin with the scope options page will be skipped, and a global installation will be performed.

# Issues

This change exposes a few issues.

* It's now easy to install Zotero twice; once on a per-user basis and once globally. I don't think many people were doing this before. Those with administrative access were installing Zotero globally. Those without administrative access were probably clicking cancel on the UAC prompt, and then installing it into their user profile. I'm not confident that the installer will handle this correctly in all cases. A few months ago submitted a branch that updated the uninstaller so that per-user and global installations were handled separately and correctly. The installer may need a similar update.
* When Zotero is installed once in each context 2 entries will appear in the add/remove programs listing. Though there is no way to differentiate them, once refers to the global installation and the other refers to the per-user installation. The uninstaller should handle this correctly.
* The UAC NSIS plugin we're using does special handling for each version of Windows. All of my testing has been done on Windows 7 64-bit and Windows Server 2008 R2.