Installing on MS Windows as a normal user

Olly Betts olly at survex.com
Fri Oct 21 05:55:38 BST 2005


Currently Survex attempts to allow installation as a normal user (one
without admin privileges, i.e. not an admin or power user).  However,
looking at the installation script I'm slightly dubious if this actually
works.

So, can anyone confirm if this works or not?  I think this issue is only
relevant to Windows 2000 and XP, not to older versions like 95 and 98
(which don't really have much of a concept of user security).  So I'm
after an answer for 2000 or XP only...

Here are the gory details, and a suggested plan.  I must admit I'm not
sure I fully understand all this stuff, so if you do please comment!

To create a machine-wide file association, we need to create registry
keys under HKCR, which (as I understand it) is only possible for admin
or power users on modern versions of Windows.  I believe I discovered
this when I tried to install Survex on a work machine and it wouldn't
because I didn't have admin rights.

So the Survex installer tries to create the HKCR keys, but uses a
"noerror" flag so there's no error if we don't have permission.  And
to handle the "normal user" case, we also install the exact same set of
keys under HKCU, which is the "user bit of the registry".  However I
read something which suggests we actually need to use
HKCU\Software\Classes for this to work, which we don't.  And looking at
the registry on a Windows 98 box this seems to be true, though I'm
suprised that nobody has ever complained about this!

I've never been totally happy about the double keys we get this way -
if a second admin/power user upgrades to a newer Survex version with
slightly different file associations as the first admin/power user will
presumably get the file associations from the older version (or at
least they would if we actually installed them correctly!)

With the latest version of the installer builder, I can conditionalise
the installation of registry keys on "IsAdminLoggedOn or
IsPowerUserLoggedOn" (and "not" of that) which means we could do one or
the other depending what rights the installing user has.  This works
correctly on Windows 98, but I really need somebody to test it who
has Windows 2000 or newer and a reasonable understanding of registries,
adminstrators, and power users.  Any volunteers?

Cheers,
    Olly



More information about the Survex mailing list