Archive: HKLM and "limited user" installations


HKLM and "limited user" installations
I'm trying to convert an older InstallShield script that wrote information about the installation directory path to:
HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Apps Path

Is this a "no no" as far as writing to HKLM because it assumes the end-user has Administator privilege?

In the past, I've never worried about this, but perhaps I should have. I've pretty much assumed the end-user was on a system as Administrator.

My understanding is that a Win2000 / WinXp "limited user" without "power user" or "administator" privilege can read HKLM registry entries, but not write them.

I've looked at the Microsoft webpages regarding WinXp certification, but I'm not clear about what is recommended vs what is required. A link (or three) for additional information would be appreciated.

We want to be able to detect previous installations (to re-install) and to leave registry "bread crumbs" as to where the installation was done. Is something related to HKLM a poor choice?

Some of the webpages I've read seem to indicate that during installation, there may be some increase in privilege for a "limited user", but that this won't be available during normal running of the app ... but I may not have been clear about what I was reading.

The examples for classic and MUI use HKCU.

I'm trying to simplify the "detection sniffer" as to where previous installations have been done. I would prefer not to have to "sort out" that there is a really old installation indicated by HKLM entries, and a newer installation indicated by a HKCU entry.

I suppose if this stuff was simple, it wouldn't pay so well <g ... written as a freeware developer>


Generally, it's best to make sure any installations are performed using an administrator account.

Here's a few links I found you might find helpful regarding user accounts:
http://www.microsoft.com/resources/d...unt_types.mspx

http://www.microsoft.com/technet/pro.../luawinxp.mspx

As far as automatically elevating prevledges, I'm not sure if this is something that can be done with NSIS or not. (probably the best you could do is check permsission .onInit and if not sufficient, exit the installation.)

On a related note, I did find elevated installations seem to be possible with Windows Installer:
http://msdn.microsoft.com/library/de...llelevated.asp

Perhpas other might offer more feedback related to NSIS...