PDA

View Full Version : How To Secure One Package Among Others?


SKyTearz
03-07-2005, 02:38 AM
What I mean is If you have more then one package in your project but you want only one of those file packs to be secure by password how would you go by doing so? I want to limit A special few to the features guarded by this password and have everybody else have the standard install ,but also have the chose to select the passworded package if they have A password issued by me.



In-Short:

This package will be in the package select dialog but if user select it they will need the password to Install the contents of that package. And if they dont they cant select that package.



Thankyou For you guys time. Hope I get A Reply Real soon.... Sorry for any spelling errors. was in a rush hehe =p

SKyTearz
03-08-2005, 05:05 PM
=[ no reply's

Adam
03-18-2005, 09:18 AM
SKy,

What you could do is run a script "On Next" that will first check for the state of that special package, then ask the user for a password if it is checked. If their password does not check out then deselect that package through code. Here is some sample code to get you started:

result = DlgSelectPackages.GetCategoryProperties(CTRL_SELEC T_PACKAGE_TREE, CTRL_CATEGORY_001);
if result.State == CB_CHECKED then
Pword = Dialog.PasswordInput("Enter Data", "Your answer:", MB_ICONQUESTION);
-- do the password validation here
-- do the password validation here
-- do the password validation here
if Valid == false then
tProperties = {State=CB_UNCHECKED}
DlgSelectPackages.SetCategoryProperties(CTRL_SELEC T_PACKAGE_TREE, CTRL_CATEGORY_001, tProperties);
end
end

Adam Kapilik

SKyTearz
03-21-2005, 01:13 PM
thankyou :)

MABD
07-09-2005, 02:39 PM
What if CTRL_SELECT_PACKAGE_TREE is nil ? I don't want to set a password but I want to set a sessionVar, but for some reason

temp = DlgSelectPackages.GetCategoryProperties(CTRL_SELEC T_PACKAGE_TREE, CTRL_CATEGORY_003);

returns a nil. I checked and found out CTRL_SELECT_PACKAGE_TREE is nil.

(i'm doing all this in the 'On Next' page of 'Select Package' screen)

cheers
MA

Adam
07-11-2005, 11:37 AM
From the help file:

If the current screen does not contain the control, this action will fail. If this action fails, nil is returned. You can use Application.GetLastError to determine whether this action failed, and why.

So are you sure that the control that you are specifying is valid?

Adam Kapilik