如何在安装期间为每个特定最终用户确定已安装模块的数量? [英] How to scope the number installed modules during installation time for each specific end user?

查看:73
本文介绍了如何在安装期间为每个特定最终用户确定已安装模块的数量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的大家,

我现在很伤心.我在制作安装程序包时遇到问题.您能跟我分享一下.我们的问题如下:

1.我希望部署软件包包含以下功能:

-用户将获得包含2个文件的部署包:setupname.msi和setupname.ini

-setupname.ini文件告诉我们最终用户有权安装哪些模块(哪些不是允许的模块).

-我们公司更改了setupname.ini,并将其与setupname.msi一起发送给客户

2.我现在的解决方案不好,我们这样做如下:

-我们在Install组的CustomAction(具体为C#中的Installer类)中实现了一个功能.此函数将读取源文件夹中的setupname.ini,并在安装过程结束时删除不允许的模块".

3.为什么我说我的解决方案不好:

-用户进行修复时,源文件夹路径为空.到目前为止,我们找不到原因.要获取源目录,我们现在通过customaction参数传递源文件夹路径(\ path ="[SourceDir]/")

-当用户安装时,在自定义操作可以运行之前,将部署包解压缩并存储在最终用户计算机上的目标文件夹中.恐怕有人可以破解它并玩我们的产品

4.问题:

-修复时如何获取SourceDir?您能给我一个示例源代码吗?
-我非常担心我的解决方案不好,所以请您给我们一些建议.如何避免将Not-allowed-modules拆包并存储在目标文件夹中?

非常感谢您的帮助.
谢谢您,并致以最诚挚的问候
Doan Huynh

Dear everybody,

I''m very sad now. I have problem with making the Setup package. Could you share with me a light.Our problem as followings:

1. I expect the deployment package contains the following features:

- The user will get the deployment package with 2 files: setupname.msi and setupname.ini

- The setupname.ini file tell us which modules the end user has permission to install (and which are not-allowed-modules).

- The setupname.ini is changed by our company and send it to customer along with the setupname.msi

2. My solution now is not good, we do as following:

- We implement a function in the CustomAction (concretely the Installer class in C#) in Install group. This function will read the setupname.ini in source folder and do deleting the "not-allowed-modules" at the end of install process.

3. Why I said my solution is not good:

- When user do repairing, the source folder path is empty. We cannot find the reason why so far. To get the source dir we now pass the source folder path through the customaction parameters (\path = "[SourceDir]/")

- When user install , the deployment package is unpacked and stored in the target folder on the end user''s machine before the customaction can run. I''m afraid someone can hack it and play with our product

4. Question:

- How to get SourceDir when repairing ? Could you give me a sample source code please?
- I''m afraid very much about my bad solution, so could you please give us some advices. How to avoid that the Not-allowed-modules are unpacked and stored in the target folder?

Any help is highly appreciated.
Thank you and best regards
Doan Huynh

推荐答案

这是一种复杂的模块许可方法,如果客户更改了许可,您必须运行另一个安装程序来添加或删除模块,会发生什么情况. br/> IMO的一种更好的方法是在启动时由应用程序加载许可证文件,然后由应用程序根据许可证文件确定要加载的模块.
如果您担心有人会更改许可证文件,请对其加密.
This is a convoluted approach to module licensing, what happens if a customer changes their licensing you have to run another installer to add or remove the modules.
IMO a better approach would be to have a license file that is loaded by your application at start-up, the application then decides which modules to load based on the license file.
If you’re worried about people changing the license file encrypt it.


这篇关于如何在安装期间为每个特定最终用户确定已安装模块的数量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆