The installer is (once again) running with Admin privilege elevation even for
a Standard Windows user, so it can't determine the underlying Standard user.
Therefore it can't clean up any per-user shortcuts left over for that Standard
user. Moved the kludge to SLVersionChecker.
Curiously, the value of $INSTDIR is correct before MULTIUSER_UNINIT, but is
made incorrect by MULTIUSER_UNINIT. Save and restore the correct value.
Saving $MultiUser.InstallMode in the registry (by setting relevant macros
examined by MultiUser.nsh) is susceptible to overwriting if the user installs
multiple viewers with the same channel name. Instead, write an InstallMode.txt
in the install directory, and read it back on uninstall. Of course, add it to
the files to be deleted on uninstall.
for 64-bit viewers.
It seems there's a longstanding bug in NSIS: it fails to use $PROGRAMFILES64
rather than $PROGRAMFILES when performing an all-users install of a 64-bit
program. Try to remedy that.
Also pick up a few NSIS suggestions from Ansariel Hiller.
This should eliminate any confusion due to a Standard user needing to elevate
to Admin privileges, since from that point on Windows tells the running
program the current user is that Admin. Bypass all that.
run the viewer from the installer.
Turns out that the peculiar indirection through explorer.exe was a known trick
for an elevated-privileges program to launch a program as the logged-in
Windows user. (They could have commented that...)
But explorer.exe doesn't pass command-line parameters, so if you want to pass
any such to the actual target program, you have to launch a shortcut with
those parameters.
But this target program (the updater) and its parameters (precheck mumble) are
specific to the very first viewer run after installation, so delete it after.
Having an additional permanent icon that always runs the updater before the
viewer would only confuse matters.
But change shortcuts and registry entries and everything else back to the real
viewer executable, so that every subsequent run directly launches the viewer.
Eliminate SL_Launcher references from viewer_manifest.py.
Specifically, the installer has been hitting
http://install.secondlife.com/check/
In most situations, the installer is run right after the user finishes
downloading it. If s/he can successfully download a big executable, we should
be able to use that network connection.
More to the point, *nothing is done* with the connect result. It serves only
to slow down the viewer installer.
The /marker switch is passed by the (new) VMP. If any user wants to explicitly
pass the /marker switch to the installer, s/he shouldn't mind ending up with
an nsis.winstall file in the download directory.
This reduces a timing hole in which one instance of SL_Launcher might place
a .winstall marker file in the download directory and run the downloaded
installer, but another SL_Launcher instance might discover that marker and try
to delete the directory before the NSIS install completes.