View Full Version : Password Issue
katanapilot
01-19-2006, 12:15 PM
Guys
I am still having issues with this password thing I want to be prompted upon checking packages boxes (seperate passwords) here is a screen shot, any advice will be helpfull.
http://office.flyelite.com/SF/install%20screen.jpg
You will have to catch the package selection change in the "On Ctrl Message" event for the "Select Packages" screen. Then you will need to use the action SetupData.IsValidSerialNumber() along with a Dialog.PasswordInput() action.
I hope this points you in the right direction
Adam Kapilik
bnkrazy
01-19-2006, 10:44 PM
Another option may be to have multiple serial input boxes on a verify serial screen...you can add extra input boxes to capture any additional license codes at the same time (each with a specific label), instead of having to use popup dialogs (pet peeve). :)
You could then check the serials entered and the packages selected to see if they match on the next event of the package screen and provide feedback if things don't add up.
katanapilot
01-20-2006, 09:57 AM
Another option may be to have multiple serial input boxes on a verify serial screen...you can add extra input boxes to capture any additional license codes at the same time (each with a specific label), instead of having to use popup dialogs (pet peeve). :)
You could then check the serials entered and the packages selected to see if they match on the next event of the package screen and provide feedback if things don't add up.
I will give that a try<
bnkrazy
01-20-2006, 01:02 PM
I was a bit pressed for time before, let me know if you get hung up and I will provide more detail. :yes
katanapilot
01-25-2006, 01:30 PM
I was a bit pressed for time before, let me know if you get hung up and I will provide more detail. :yes
Ok going back to this again,
this is the current code on the CTRL message screen propertys for the selection packages.
All I need is when the user checks the box to add them a serial/password or Lic in order for the option to be installable....
I will keep posted as i keep testing!!!
if(e_CtrlID == CTRL_SELECT_PACKAGE_TREE) then
-- the control message is from the select packages tree...
-- if the current selection changed (i.e. a different package was selected),
-- update the description field
if(e_MsgID == MSGID_ONSELCHANGED) then
-- get the selected item's description
local strText = e_Details.Description;
-- if the selected item is a package, add its size to the description
if(e_Details.Type == 1) then
strText = strText.."\n( "..String.GetFormattedSize(e_Details.Size).." )";
end
-- update the description field
DlgStaticText.SetProperties(CTRL_STATICTEXT_BODY, {Text=strText});
end
-- if an item's state changed (i.e. a package was turned on or off),
-- update the 'Total space required:' message
if(e_MsgID == MSGID_ONSTATECHANGED) then
-- calculate the amount of space required for the installation
_SpaceRequired = SetupData.CalculateRequiredSpace();
-- set %SpaceRequired% to a string with an appropriate unit of measurement (e.g. "0 bytes")
SessionVar.Set("%SpaceRequired%", String.GetFormattedSize(_SpaceRequired) );
-- from _SUF70_Global_Functions.lua:
-- update the 'Total space required:' message (expands any session variables in it)
g_UpdateStaticTextCtrl(CTRL_STATICTEXT_SPACEREQUIR ED, "IDS_CTRL_STATICTEXT_SPACEREQUIRED");
end
end
katanapilot
01-26-2006, 09:23 AM
I just thought about this one....
would it be more simple to enter one "licence" number and depending what licence number you have enterd, that will give a diffrent "package" amount option.
Either way, I just need a way to licence or passowrd diffrent pacakages.
thanks
Cal
katanapilot
01-31-2006, 01:41 PM
I just thought about this one....
would it be more simple to enter one "licence" number and depending what licence number you have enterd, that will give a diffrent "package" amount option.
Either way, I just need a way to licence or passowrd diffrent pacakages.
thanks
Cal
Any one.... :rolleyes :rolleyes :rolleyes :rolleyes
bnkrazy
01-31-2006, 10:54 PM
Sorry, been busy again...
I started working on a installer shell today to address this issue as I will need this functionality sooner or later...I will try and finish it up tomorrow and post it here.
katanapilot
01-31-2006, 10:58 PM
Sorry, been busy again...
I started working on a installer shell today to address this issue as I will need this functionality sooner or later...I will try and finish it up tomorrow and post it here.
Thanks
Really apreciate it
bnkrazy
02-02-2006, 06:07 PM
Well, I am 99.999% done, and hit a roadblock. There is a small bug in the update procedure of the Select Packages screen that IR is aware of (http://www.indigorose.com/forums/showthread.php?p=74558#post74558) that should be fixed soon...I will zip up what I have and post it in a bit (with more detail of the problem) to get you started at least.
bnkrazy
02-02-2006, 07:35 PM
Here is the SF7 package that shows a simple way to verify a core serial and addon serials... The points of interest are the Serials lists, Verify Serial Number screen On Next event and the Select Package screen Preload event.
This method hinges on a core serial list and additional addon serial lists. The addon serial lists include a default serial of 000 to allow users to not install that addon. If a user enters a valid (non zero) serial, then the script on the Select Packages screen (Preload) will enable the package that corresponds to that addon serial list.
Since there is a bug that prevents the Select Packages Screen from updating properly, this method should also be effective on a checkbox screen as well, although I have not had time to test that yet.
katanapilot
02-02-2006, 08:22 PM
WOW, that was quick, time to play!!!
I will let u know
katanapilot
02-02-2006, 11:23 PM
Here is the SF7 package that shows a simple way to verify a core serial and addon serials... The points of interest are the Serials lists, Verify Serial Number screen On Next event and the Select Package screen Preload event.
This method hinges on a core serial list and additional addon serial lists. The addon serial lists include a default serial of 000 to allow users to not install that addon. If a user enters a valid (non zero) serial, then the script on the Select Packages screen (Preload) will enable the package that corresponds to that addon serial list.
Since there is a bug that prevents the Select Packages Screen from updating properly, this method should also be effective on a checkbox screen as well, although I have not had time to test that yet.
OK I got the concept here, and we are 90% there...
what if they did not have an add on serial, cant it continue with out installing the add on (with out prompts)?
KP-
bnkrazy
02-03-2006, 07:38 AM
If they leave the 000 serial in for the addon, it should continue on and set the package associated with that addon to not be installed. The code is in select package screen preload event.
I was doing some testing while trying to get around the display refresh issue and may have left the Addon package changeable by the user...it should be set in the Select Package screen to not be installed and to not be changeable by the end user.
I will take a look at it over the weekend and see if that is the case, also I will look at using a checkbox screen until the select packages screen is fixed.
Actually, I believe the installer will actually go ahead and install the packages, it is just a refresh issue o the Select Packages screen that prevents it from showing that it will install. It may be easier/quicker to simply not show any addons in the select package screen and have a summary page instead that lists what is being installed...just get rid of the SP screen all together.
katanapilot
02-03-2006, 08:56 AM
strange, it does install with 000 code in the box, and will install the package assosciated with it.
should it read: local l_tbInstallAddon1 = {Install=false};
local l_SerialNumber = SessionVar.Expand("%SerialNumber%");
local l_SerialNumberAddon1 = SessionVar.Expand("%SerialNumberAddon1%");
local l_tbInstallAddon1 = {Install=false};
--Dialog.Message("test",l_SerialNumberAddon1);
if l_SerialNumberAddon1 ~= "000" then
local l_tbInstallAddon1 = {Install=true};
--Dialog.Message("test", "true");
end
katanapilot
02-03-2006, 10:38 AM
Ok, tried the code modification and it still installs the pacages...
All I would need is a "generic code" non valid to continue on and not install the add on...
KP
bnkrazy
02-04-2006, 12:29 PM
OK, the reresh issue still exists, kindof. I had a bug in my code that caused some of the problems I think you were seeing. This version works well. If you enter valid serials, the screen may or may not update when you move from the VS screen to the SP screen. However, if you go from the Verify serials -> Select Package -> Verify Serials -> Select Packages (back and forth) it updates to show the correct packages.
I added some files to the installer to show it working correctly. It will support any combination of core + addon 1 or addon 2.
I included some files to show the functionality, but you will need to odify the locations for them to work.
katanapilot
02-05-2006, 07:26 PM
OK, the reresh issue still exists, kindof. I had a bug in my code that caused some of the problems I think you were seeing. This version works well. If you enter valid serials, the screen may or may not update when you move from the VS screen to the SP screen. However, if you go from the Verify serials -> Select Package -> Verify Serials -> Select Packages (back and forth) it updates to show the correct packages.
I added some files to the installer to show it working correctly. It will support any combination of core + addon 1 or addon 2.
I included some files to show the functionality, but you will need to odify the locations for them to work.
Thanks a million, works as you mentioned... I added 4 more packages (6 total) requiring password... reviewing your code, I think I have seen what lines to duplicate... I will make the dvd tommorow and let you know how it works.
KP-
bnkrazy
02-05-2006, 08:41 PM
No problem, let me know if you need help pulling out the relevant pieces.
katanapilot
02-06-2006, 02:21 AM
No problem, let me know if you need help pulling out the relevant pieces.
Almost there...
With the correct serial numbers, packages install correcty... but with the generic (Enter Licence or call 1-800-557-7590 =not to install=) I get error 4, 2, 1, 0 "invalid serial number add on"
here is the code from packages preload to see if it makes sense...
-- These actions are performed before the screen is shown.
-- calculate the amount of space required for the installation
_SpaceRequired = SetupData.CalculateRequiredSpace();
-- format it as a string with an appropriate unit of measurement (e.g. "0 bytes")
local strSpaceRequired = String.GetFormattedSize(_SpaceRequired);
-- store the string in a session variable so it can be used in the screen text
SessionVar.Set("%SpaceRequired%", strSpaceRequired);
-- from _SUF70_Global_Functions.lua:
-- update the 'Total space required:' message (expands any session variables in it)
g_UpdateStaticTextCtrl(CTRL_STATICTEXT_SPACEREQUIR ED, "IDS_CTRL_STATICTEXT_SPACEREQUIRED");
--[[
Update Packages Selected based on serials
]]--
local l_SerialNumber = SessionVar.Expand("%SerialNumber%");
local l_SerialNumberAddon1 = SessionVar.Expand("%SerialNumberAddon1%");
local l_SerialNumberAddon2 = SessionVar.Expand("%SerialNumberAddon2%");
local l_SerialNumberAddon3 = SessionVar.Expand("%SerialNumberAddon3%");
local l_SerialNumberAddon4 = SessionVar.Expand("%SerialNumberAddon4%");
local l_SerialNumberAddon5 = SessionVar.Expand("%SerialNumberAddon5%");
--Dialog.Message("test",l_SerialNumberAddon1);
local l_tbInstallAddon1 = SetupData.GetPackageProperties("Addon1");
l_tbInstallAddon1.Install = false;
if l_SerialNumberAddon1 ~= "Call 1-800-557-7590 to order" then
l_tbInstallAddon1.Install = true;
else
l_tbInstallAddon1.Install = false;
end
SetupData.SetPackageProperties("Addon1", l_tbInstallAddon1);
local l_tbInstallAddon2 = SetupData.GetPackageProperties("Addon2");
l_tbInstallAddon2.Install = false;
if l_SerialNumberAddon2 ~= "Enter Licence or call 1-800-557-7590" then
l_tbInstallAddon2.Install = true;
else
l_tbInstallAddon2.Install = false;
end
SetupData.SetPackageProperties("Addon2", l_tbInstallAddon2);
local l_tbInstallAddon3 = SetupData.GetPackageProperties("Addon3");
l_tbInstallAddon3.Install = false;
if l_SerialNumberAddon3 ~= "Enter Licence or call 1-800-557-7590" then
l_tbInstallAddon3.Install = true;
else
l_tbInstallAddon3.Install = false;
end
SetupData.SetPackageProperties("Addon3", l_tbInstallAddon3);
local l_tbInstallAddon4 = SetupData.GetPackageProperties("Addon4");
l_tbInstallAddon4.Install = false;
if l_SerialNumberAddon4 ~= "Enter Licence or call 1-800-557-7590" then
l_tbInstallAddon4.Install = true;
else
l_tbInstallAddon4.Install = false;
end
SetupData.SetPackageProperties("Addon4", l_tbInstallAddon4);
local l_tbInstallAddon5 = SetupData.GetPackageProperties("Addon5");
l_tbInstallAddon5.Install = false;
if l_SerialNumberAddon5 ~= "Enter Licence or call 1-800-557-7590" then
l_tbInstallAddon5.Install = true;
else
l_tbInstallAddon5.Install = false;
end
SetupData.SetPackageProperties("Addon5", l_tbInstallAddon5);
DlgSelectPackages.UpdateDisplay(CTRL_SELECT_PACKAG E_TREE)
bnkrazy
02-06-2006, 09:06 AM
Is there a valid serial number of "Call 1-800-557-7590 to order" for addon1's serial list and "Enter Licence or call 1-800-557-7590" for addon 2/3/4/5?
The default text of the serial box (I used "000") has to exist in the serial list so when the user leaves that box alone it will accept the default serial.
If your user attempts to enter an invalid serial for an addon and then tries to continue on without installing that addon, they will need to retype the "Enter Licence or call 1-800-557-7590" in the serial textbox so that it will match the serial list for that addon (if that is what you are using for the default serial). This is why I used something simple like the 000.
The concept is to have the addon serial input boxes default to a valid serial so that we can then later check if that default serial is used or if they entered another valid serial...if they used the default, obviously we don't want to install the package. If however they replaced that default with another valid serial, we then want to install the package. For this reason I suggest a very simple default...thus the tripple zeros. Otherwise, they have to retype that whole sentance to continue. I never got around to actually expaining any of my logic. Maybe this helps?
katanapilot
02-06-2006, 10:41 AM
I get your logic behind it all... the long "Enter Licence or call 1-800-557-7590" was a request from the boss. Some how I forgot to add it in the security window, here is the latest...
Now I can continue installing, but it will install with the Enter Licence or call 1-800-557-7590, in other words with the "Enter Licence or call 1-800-557-7590" in the serial number boxes the Packages are available and not grayed out.
KP
(see code below)
PACKAGES/PRELOAD
-- These actions are performed before the screen is shown.
-- calculate the amount of space required for the installation
_SpaceRequired = SetupData.CalculateRequiredSpace();
-- format it as a string with an appropriate unit of measurement (e.g. "0 bytes")
local strSpaceRequired = String.GetFormattedSize(_SpaceRequired);
-- store the string in a session variable so it can be used in the screen text
SessionVar.Set("%SpaceRequired%", strSpaceRequired);
-- from _SUF70_Global_Functions.lua:
-- update the 'Total space required:' message (expands any session variables in it)
g_UpdateStaticTextCtrl(CTRL_STATICTEXT_SPACEREQUIR ED, "IDS_CTRL_STATICTEXT_SPACEREQUIRED");
--[[
Update Packages Selected based on serials
]]--
local l_SerialNumber = SessionVar.Expand("%SerialNumber%");
local l_SerialNumberAddon1 = SessionVar.Expand("%SerialNumberAddon1%");
local l_SerialNumberAddon2 = SessionVar.Expand("%SerialNumberAddon2%");
local l_SerialNumberAddon3 = SessionVar.Expand("%SerialNumberAddon3%");
local l_SerialNumberAddon4 = SessionVar.Expand("%SerialNumberAddon4%");
local l_SerialNumberAddon5 = SessionVar.Expand("%SerialNumberAddon5%");
--Dialog.Message("test",l_SerialNumberAddon1);
local l_tbInstallAddon1 = SetupData.GetPackageProperties("Addon1");
l_tbInstallAddon1.Install = false;
if l_SerialNumberAddon1 ~= "Enter Licence or call 1-800-557-7590" then
l_tbInstallAddon1.Install = true;
else
l_tbInstallAddon1.Install = false;
end
SetupData.SetPackageProperties("Addon1", l_tbInstallAddon1);
local l_tbInstallAddon2 = SetupData.GetPackageProperties("Addon2");
l_tbInstallAddon2.Install = false;
if l_SerialNumberAddon2 ~= "Enter Licence or call 1-800-557-7590" then
l_tbInstallAddon2.Install = true;
else
l_tbInstallAddon2.Install = false;
end
SetupData.SetPackageProperties("Addon2", l_tbInstallAddon2);
local l_tbInstallAddon3 = SetupData.GetPackageProperties("Addon3");
l_tbInstallAddon3.Install = false;
if l_SerialNumberAddon3 ~= "Enter Licence or call 1-800-557-7590" then
l_tbInstallAddon3.Install = true;
else
l_tbInstallAddon3.Install = false;
end
SetupData.SetPackageProperties("Addon3", l_tbInstallAddon3);
local l_tbInstallAddon4 = SetupData.GetPackageProperties("Addon4");
l_tbInstallAddon4.Install = false;
if l_SerialNumberAddon4 ~= "Enter Licence or call 1-800-557-7590" then
l_tbInstallAddon4.Install = true;
else
l_tbInstallAddon4.Install = false;
end
SetupData.SetPackageProperties("Addon4", l_tbInstallAddon4);
local l_tbInstallAddon5 = SetupData.GetPackageProperties("Addon5");
l_tbInstallAddon5.Install = false;
if l_SerialNumberAddon5 ~= "Enter Licence or call 1-800-557-7590" then
l_tbInstallAddon5.Install = true;
else
l_tbInstallAddon5.Install = false;
end
SetupData.SetPackageProperties("Addon5", l_tbInstallAddon5);
DlgSelectPackages.UpdateDisplay(CTRL_SELECT_PACKAG E_TREE)
SERIAL/ON NEXT
-- These actions are performed when the Next button is clicked.
-- get the serial number that the user entered
local strSerial = SessionVar.Expand("%SerialNumber%");
local strSerialAddon1 = SessionVar.Expand("%SerialNumberAddon1%");
local strSerialAddon2 = SessionVar.Expand("%SerialNumberAddon2%");
local strSerialAddon3 = SessionVar.Expand("%SerialNumberAddon3%");
local strSerialAddon4 = SessionVar.Expand("%SerialNumberAddon4%");
local strSerialAddon5 = SessionVar.Expand("%SerialNumberAddon5%");
-- the name of the serial number list you want to use, e.g. "Serial List 1"
-- (use nil to search through all of the serial number lists)
local strListCore = "CoreSerials";
local strListAddon1 = "Addon1Serials";
local strListAddon2 = "Addon2Serials";
local strListAddon3 = "Addon3Serials";
local strListAddon4 = "Addon4Serials";
local strListAddon5 = "Addon5Serials";
-- from _SUF70_Global_Functions.lua:
-- search through the specified serial number list for a match
local bSerialIsValid = g_IsSerialNumberInList(strSerial, strListCore);
local bSerialAddon1IsValid = g_IsSerialNumberInList(strSerialAddon1, strListAddon1);
local bSerialAddon2IsValid = g_IsSerialNumberInList(strSerialAddon2, strListAddon2);
local bSerialAddon3IsValid = g_IsSerialNumberInList(strSerialAddon3, strListAddon3);
local bSerialAddon4IsValid = g_IsSerialNumberInList(strSerialAddon4, strListAddon4);
local bSerialAddon5IsValid = g_IsSerialNumberInList(strSerialAddon5, strListAddon5);
-- if the user entered a valid serial number, proceed to the next screen,
-- otherwise display an error message and check whether they have any retries left
if(bSerialIsValid) then
if(bSerialAddon1IsValid) then
if(bSerialAddon2IsValid) then
-- All serails OK, continue
-- advance to the next screen
Screen.Next();
else
-- user entered an invalid Addon 5 serial number
SerialNumberScreen.AttemptCount = SerialNumberScreen.AttemptCount + 1;
-- display an 'Invalid serial number' message
Dialog.Message(SetupData.GetLocalizedString("MSG_ERROR"), "Invalid Addon 5 Serial number");
-- if the user is out of retries, exit the application
if(SerialNumberScreen.AttemptCount >= SerialNumberScreen.MaxAttempts) then
Application.Exit(0);
end
end
else
-- user entered an invalid Addon 4 serial number
SerialNumberScreen.AttemptCount = SerialNumberScreen.AttemptCount + 1;
-- display an 'Invalid serial number' message
Dialog.Message(SetupData.GetLocalizedString("MSG_ERROR"), "Invalid Addon 4 Serial number");
-- if the user is out of retries, exit the application
if(SerialNumberScreen.AttemptCount >= SerialNumberScreen.MaxAttempts) then
Application.Exit(0);
end
end
else
-- user entered an invalid Addon 3 serial number
SerialNumberScreen.AttemptCount = SerialNumberScreen.AttemptCount + 1;
-- display an 'Invalid serial number' message
Dialog.Message(SetupData.GetLocalizedString("MSG_ERROR"), "Invalid Addon 3 Serial number");
-- if the user is out of retries, exit the application
if(SerialNumberScreen.AttemptCount >= SerialNumberScreen.MaxAttempts) then
Application.Exit(0);
end
end
-- user entered an invalid Addon 2 serial number
SerialNumberScreen.AttemptCount = SerialNumberScreen.AttemptCount + 1;
-- display an 'Invalid serial number' message
Dialog.Message(SetupData.GetLocalizedString("MSG_ERROR"), "Invalid Addon 2 Serial number");
-- if the user is out of retries, exit the application
if(SerialNumberScreen.AttemptCount >= SerialNumberScreen.MaxAttempts) then
Application.Exit(0);
end
-- user entered an invalid Addon 1 serial number
SerialNumberScreen.AttemptCount = SerialNumberScreen.AttemptCount + 1;
-- display an 'Invalid serial number' message
Dialog.Message(SetupData.GetLocalizedString("MSG_ERROR"), "Invalid Addon 1 Serial number");
-- if the user is out of retries, exit the application
if(SerialNumberScreen.AttemptCount >= SerialNumberScreen.MaxAttempts) then
Application.Exit(0);
end
-- user entered an invalid serial number
SerialNumberScreen.AttemptCount = SerialNumberScreen.AttemptCount + 1;
-- display an 'Invalid serial number' message
Dialog.Message(SetupData.GetLocalizedString("MSG_ERROR"), SetupData.GetLocalizedString("ERR_INVALID_SERIAL"));
-- if the user is out of retries, exit the application
if(SerialNumberScreen.AttemptCount >= SerialNumberScreen.MaxAttempts) then
Application.Exit(0);
end
katanapilot
02-06-2006, 08:36 PM
I feel like I am almost there, I can advance past the serial screen now, but the add ons "ARE" available for install with the "Enter Licence or call 1-800-557-7590" in the feild. In other words the validation some how is ignored, also not sure if this means any thing but the "Enter Licence or call 1-800-557-7590" is in the security screen per each packages as a pass/lic.
KP-
bnkrazy
02-10-2006, 09:24 AM
How is this coming? Just a quick check...did you set the package selection screen addons to disabled by default (check my demo)? If you left those enabled, that would explain them being available maybe?
I also sent you a private message...did you get that?
Just for kicks, if this is still an issue, change the default serial to something simple like the '000' to be sure it is not a wierd issue with the long string you are using now... I have a feeling that is probably the problem.
katanapilot
02-10-2006, 10:16 AM
How is this coming? Just a quick check...did you set the package selection screen addons to disabled by default (check my demo)? If you left those enabled, that would explain them being available maybe?
I also sent you a private message...did you get that?
Just for kicks, if this is still an issue, change the default serial to something simple like the '000' to be sure it is not a wierd issue with the long string you are using now... I have a feeling that is probably the problem.
Ok
I will look at this, however I sent you an email/PM
thanks lots
cal
Powered by vBulletin™ Version 4.0.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.