|
|
 | | From: | Al Vas | | Subject: | Password protect for only one component | | Date: | Thu, 16 Dec 2004 19:36:34 +1100 |
|
|
 | Hi,
If an install type includes a particular component I want the installer to ask for a password to continue, if not then it can continue normally. So for example:
There are 3 components; one, two, three. One of the install types includes all 3 components, but three requires a password to install. Another install type only includes components one and two, so no password is required.
Any way to achieve this?
Thanks
Alex
|
|
 | | From: | Gavin Lambert | | Subject: | Re: Password protect for only one component | | Date: | Fri, 17 Dec 2004 10:44:00 +1300 |
|
|
 | Al Vas wrote: > If an install type includes a particular component I want the installer to > ask for a password to continue, if not then it can continue normally. So > for example: > > There are 3 components; one, two, three. One of the install types includes > all 3 components, but three requires a password to install. Another > install type only includes components one and two, so no password is > required.
You can't do that with the standard password page, since that appears well before the user gets the chance to select which types/components they want to install.
It's possible to add your own custom page somewhere after wpSelectComponents (and skip it if they haven't selected the protected component). Don't forget though that if they select a silent install then your custom page won't appear, so you'll have to check for that separately. Also, doing your own password in this manner means that you can't use encryption, so it's possible for someone to use innounp or similar to extract the files and bypass your password.
A more robust solution would be to pack component 3 in its own standalone installer (with encryption), and then include that installer inside your main one and run it if the user selected it. You can use a custom page again and pass the entered password to the subinstall on the commandline, or you can just run it and let the user enter the password in its own page (which would let the user cancel the subinstall while finishing the main install. But that might be okay, depending on your design).
|
|
|