Click here to Skip to main content
15,888,330 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Updated 7-Dec-09 22:36pm
v2

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900