Hi,
I'm trying IA out and trying to figure out how to create a registration dialog that looks like this:
User Name
NNNNNNNNNNNNNNNNNNNNNNN
Organization
NNNNNNNNNNNNNNNNNNNNNNN
Serial Number
XXX-XXXXX-XXXXX-XXX
Activation Code
XXXX-XXXX-XXXX-XXX
And then I'll create some custom action to execute validateit.exe against those numbers and determine if Next should be allowed.
So I looked at the Sample "SerialValidation" which really does something very different. It validates it's own serial number internally and uses an apparentely fixed registration dialog?
How does one modify the dialog itself to the format I need (above)?
And in the Serialvalidation example, all i see are "$KEY1..." keys defined as globals. How do you define the length of those strings which seem to be N=5 somehow?
Are there any good "how-to"'s explaining how you would handle certain operations, even simple basic ones with IA either on this site or elsewhere on the internet? I don't really see how to "get started" with IA unless you're quite familiar with the scripting language.
Thanks!
Serial / Activation dialog and custom external validation
-
- Posts: 904
- Joined: Thu Dec 22, 2005 7:03 pm
- Contact:
First, you want to edit the dialog, so that it looks like what you want, and has the controls that you need.
When editing the dialog, you can use the TMaskEdit control instead of the default TEdit control, this will let you specify a mask that allows/denies characters in the input key, so that you are helping users enter the right key.
You can set the maximum length of each field using the MaxLength field, after which the controls will auto-tab to the next control on the form.
Then, double-click each edit control, and assign them to a script variable. In the sample, they are set to KEY1 etc., but you can use any variable names you like - just remember to initialize them in the script using the Set Variable command before showing your dialog.
Finally, you can just call Run Program (or Call DLL Function if you have a DLL - this will be more professional) to validate the resulting input.
When editing the dialog, you can use the TMaskEdit control instead of the default TEdit control, this will let you specify a mask that allows/denies characters in the input key, so that you are helping users enter the right key.
You can set the maximum length of each field using the MaxLength field, after which the controls will auto-tab to the next control on the form.
Then, double-click each edit control, and assign them to a script variable. In the sample, they are set to KEY1 etc., but you can use any variable names you like - just remember to initialize them in the script using the Set Variable command before showing your dialog.
Finally, you can just call Run Program (or Call DLL Function if you have a DLL - this will be more professional) to validate the resulting input.
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
CandiceJones wrote:First, you want to edit the dialog, so that it looks like what you want, and has the controls that you need.
OK, so I upgraded to the Studio version because I couldn't modify the dialogs in the Developer version.
Another question. I started a new project from a "Win32 Setup" template.
I see that in the left-most column, I guess what you'd call the project browser or something, I see under the "Dialogs" heading a "registrationwithserial" and if I double click on it, I can edit it. That's fine, however I want to use this dialog in my sequence, but I can't see how to get it into the sequence. You cannot drag or right-click copy or otherwise get a dialog from the project browser into the sequence. See attached png. Why are some dialogs showing up in the "dialogs" heading under the project but not in the sequence? How do I "get them in the sequence"?
Thanks.
File Attached:
<a href="files/020120071727/IA.PNG">IA.PNG
-
- Posts: 904
- Joined: Thu Dec 22, 2005 7:03 pm
- Contact:
Just switch to MSIcode. Expand the code folding region for user interview - this is what the visual UI reads and displays back to you. You can just edit the Display Dialog command there to show registrationwithserial instead of registration.
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
CandiceJones wrote:Just switch to MSIcode. Expand the code folding region for user interview - this is what the visual UI reads and displays back to you. You can just edit the Display Dialog command there to show registrationwithserial instead of registration.
OK, that works great. Thanks.
Another question. I'm editing the existing registrationwithserial dialog and notice that the product key is not a "maskedit" box. Shouldn't it be? I suppose that's only important to "mask edit" a field is needed, of course, but I figured any serial numbers would be.
I'm adding my activation key portion to the dialog now and adding them as maskedit's, however these fields are behaving strangely. As soon as I tab into them, they jump to the next. That's a nice feature once you reach a maxlength, however, the Maxlengths are all set higher than 4 on all of them. What else would be causing these to jump to the next as soon as I tab into them and before I'm able to type anything?
On a related note, what is the format of the "editMask" property? I haven't been able to find any doc on "editmask" either in the help or searching for that term in these forums.
Thanks.
-
- Posts: 904
- Joined: Thu Dec 22, 2005 7:03 pm
- Contact:
djm wrote:I'm editing the existing registrationwithserial dialog and notice that the product key is not a "maskedit" box. Shouldn't it be?
No, this is by design - you can just easily replace if you need a mask. Some keys are hard to specify with a mask, so...
djm wrote:What else would be causing these to jump to the next as soon as I tab into them and before I'm able to type anything?
That certainly sounds strange. Maybe if you post the dialog we can find out more?
djm wrote:On a related note, what is the format of the "editMask" property? I haven't been able to find any doc on "editmask" either in the help or searching for that term in these forums.
Check this post:
http://forums.installaware.com/viewtopi ... c&start=28
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
CandiceJones wrote:djm wrote:What else would be causing these to jump to the next as soon as I tab into them and before I'm able to type anything?
That certainly sounds strange. Maybe if you post the dialog we can find out more?
Attached.
File Attached:
<a href="files/020520071125/registrationwithserial.dfm">registrationwithserial.dfm
CandiceJones wrote:djm wrote:On a related note, what is the format of the "editMask" property? I haven't been able to find any doc on "editmask" either in the help or searching for that term in these forums.
Check this post:
http://forums.installaware.com/viewtopi ... c&start=28
OK, that's a helpful post on this. However, when I enter a mask for a field, like "L000" (or any mask for that matter), the fields on the form have a prefilled _ (underscore) all the way through the input box. Is that intentional? I've never seen that on any installer before. Perhaps maskedit boxes are the wrong way to go here and I should just stick with the general text boxes that the original license key template came with. It seems like maskedit's would be helpful, but is there a way to avoid the underscores?
Thanks.
-
- Posts: 904
- Joined: Thu Dec 22, 2005 7:03 pm
- Contact:
No, that's sort of the whole point of the masked edit control.
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
CandiceJones wrote:Finally, you can just call Run Program (or Call DLL Function if you have a DLL - this will be more professional) to validate the resulting input.
Unfortunately it looks like I'll have to use an executable for this.
Ideally I want to check the serial number and activation in this way:
1. I want the Next button to be grayed out until the serial/activation return SUCCESS via the executable.
2. The executable runs when all the data is filled in as well as with any changes that occur in the fields as long as they are all filled in.
3. So basically the NEXT button will activate as soon as a valid serial/activation is entered.
Here's what I have so far in MSICode for the serial number validation check, but it's far from working. Can you point me at the doc or a how-to on how I might make this work in the way I described above?
Code: Select all
label: User Registration
Display Dialog: registrationwithserial, wait for dialog to return (modal)
Run Program $PROGRAMFILES$\\bin\\32\\ps_checkser.exe $Serial1$-$Serial2$-$Serial3$-$Serial4$ $Activation1$-$Activation2$-$Activation3$-$Activation4$
if Variable SERIAL_RETVAL Equals 0
if Variable WIZARD Equals BACK
GoTo Label: ReadMe Information
else
if Variable WIZARD Equals CANCEL
GoTo Label: Main Install
end
end
end
I think I want to use a "file bag" for this ps_checkser.exe, but I don't see how to access this "file bag" within IA. The Help information on "File bag" is fairly vague and I haven't been able to find anything in the forums describing where to find it and how to use it. It's not a sub-feature of the SetupArchitecture->Files hierarchy under the "Visual" tab in the IDE. And there's no specific "file bag" I can see in the Visual tab at all either.
Am I looking in the wrong place for documentation? What exactly is this "file bag" and how do I access it?
Thanks.
-
- Posts: 904
- Joined: Thu Dec 22, 2005 7:03 pm
- Contact:
You won't be able to disable or enable the Next button - as the scripting you want has to happen outside of the dialog. What you will be able to do is prompt the user with say, a MessageBox, and send them back to the dialog box if the entered serial is invalid.
You don't need to do File Bag. Just add the file as a support file (called Creatives in the visual view), and run it from $SUPPORTDIR$.
Make sure you have pre-initialized the variables for the serials before calling the dialog.
Finally, I guess you want to add another else (if the return is not 0) for the MessageBox, and then a GoTo back to the User Reg label.
You don't need to do File Bag. Just add the file as a support file (called Creatives in the visual view), and run it from $SUPPORTDIR$.
Make sure you have pre-initialized the variables for the serials before calling the dialog.
Finally, I guess you want to add another else (if the return is not 0) for the MessageBox, and then a GoTo back to the User Reg label.
Candice Jones
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/
Who is online
Users browsing this forum: No registered users and 82 guests