Archive: Allow update of license and program


Allow update of license and program
I am new to NSIS. After 12 years of Installshield Express, I've grown tired of its expense and lack of flexibility. After some effort I basically have my software installation scripts working -- only one slight problem, it does not work on Windows Vista. With my Installshield installations, I had to have two different installation programs for my software -- one for first-time installation, and one for upgrading. I think I have solved this by using NSIS for a single installation program.

I have a simple installation with a single executable and some optional data files.

I need advice on the best approach to do the following.

Once someone installs the software, they need to be able to update the license information. Currently that is stored in HKLM. The license information is updated via a software dialog, so I know that it will be written only if it is valid.

The second thing I need to be able to do is upgrade the software by overwriting the executable program. With Installshield about 20% of my end users require uninstall of the program before they can upgrade - a problem I cannot duplicate on any of our in-house systems.

I am thinking to use the AccessControl plug-in.

I would need to make the HKLM "Software\vendor\program\License" with write permissions.

I do not like the idea of making the executable writable, except by the subsequent installation program, but may have to do so.

I am sure this is a common inquiry, but could not find this with my search terms. I appreciate any help.


If you use HKLM, you always must ask for admin privileges at installation. And since you installed as admin once, it doesn't make sense to 'upgrade' it at userlevel. Your upgrader will simply have to request admin access as well.


I was able to do exactly what I had requested using:

AccessControl::GrantOnRegKey HKLM "Software\vendor\program\License" "Everyone" "FullAccess"


This allows updating the license by the user.
There is also not a problem with upgrading the files.

This is great!!