Old 13th January 2011, 03:48   #1
Junior Member
Join Date: Jan 2011
Posts: 5
Question 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.
mvpetrovich is offline   Reply With Quote
Old 13th January 2011, 06:11   #2
Major Dude
Join Date: Oct 2006
Posts: 1,892
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.
MSG is offline   Reply With Quote
Old 13th January 2011, 13:22   #3
Junior Member
Join Date: Jan 2011
Posts: 5
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!!
mvpetrovich is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

accesscontrol, license, registery, upgrade

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump