开发者

How to prevent over-installation of software [closed]

开发者 https://www.devze.com 2023-01-21 09:33 出处:网络
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this
Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 7 years ago.

Improve this question

I have a software product installed on multiple machines at a client's site. The software accesses a database which is located on a server.

I have given them an MSI so that they can install the software on further machines if required.

How can I programmatically place a limit on the number of machines the software can be insta开发者_如何学Clled on?

The software previously placed a value in a HKLM registry key, but Vista and Win 7 doesn't allow the HKLM key to be written to anymore, so how am I meant to monitor installations now?


There are products like Symantec client management suite and server management suite which would let you do the software license management of all your software over the network. See here. Although, I'm afraid, they're enterprise products and might cost that way. I've actually worked on developing both of them.


You likely should make your legacy app UAC aware (e.g. Microsoft instruction for application developers on Vista, a Code Project tutorial) and request special privileges for it, to continue to use HKLM or equivalent. Once your program has the proper privileges (e.g. administrator) it should be able to continue functioning in the UAC environment as it did in legacy Windows.

One side effect is a non-administrator would not be able to properly install your program, but this is not unusual in the "new world" of Window Vista, 7, and everything going forward. It looks like the "everybody is an administrator" philosophy is not coming back.

(Note: I use the term "administrator privilege" but mean whatever is the least privilege you will need to get the job done).

Likely it will require a bit of work, when I see caveats like this in quotes:

Elevation procedures surrounding installers are a bit too complex to go into detail here, however be warned that the requiresAdministrator flag on an MSI package does not actually provide full administrator permissions. This actually behaves slightly differently and runs as a subset of the full privileges unless you use a bootstrapper to gain full elevation. It is rare that installers would require these additional tokens as the installer's administrator permissions are generally sufficient.

The benefit is once you've converted one app, you will have the knowledge and code base to upgrade other programs accordingly.

I'm sure other people will suggest code workarounds which are satisfactory and likely won't use HKLM.

0

精彩评论

暂无评论...
验证码 换一张
取 消