This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Validate Serial Number for Basic MSI?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Aug 20, 2007
12:37 PM
Validate Serial Number for Basic MSI?
I need to add some sort of custom action to the Customer Information Dialog's Next Button to evaluate what the user entered in the Serial Number field. If the validation fails, it needs to display an error dialog and return to the Customer Information Dialog. If it succeeds, it moves on to the Ready to Install Dialog.
Is there a way to insert a custom action in between the dialogs? A way to change properties via a custom action at this point so that the appropriate dialog is displayed?
Is there a way to insert a custom action in between the dialogs? A way to change properties via a custom action at this point so that the appropriate dialog is displayed?
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Aug 21, 2007
12:01 AM
Here's the way to do it, if it's a single branch, ie. if the custom action succeeds, show dialog A, if it fails, show dialog B. It can easily be extended for multiple paths.
Create the required action, and do not put it in any of the sequences. The custom action should set some property, say SerialNumberValid to 1 or 0, based on whether the serial number is valid or not. See MsiSetProperty documentation for setting properties.
Go to the dialog view to the dialog where you are validating the serial number and go to the Behavior tab (it opens when you click the + sign of the dialog)
Choose the Next button, and delete the entries that are there
Add a new behavior to run your CA
Event -> DoAction
Argument -> (Name of your CA)
Condition - (Leave it blank)
Add one behavior for the success dialog
Event -> NewDialog
Argument -> (Name of your success dialog)
Condition - [SerialNumberValid] = "1"
Add one behavior for the failure dialog
Event -> NewDialog
Argument -> (Name of your failure dialog)
Condition - [SerialNumberValid] <> "1"
Make sure that the CA entry is the first one. The actions are processed top-down.
Also verify that your Back and Next buttons on the preceding and next dialogs point to the right dialogs, otherwise you'll end end with buttons that don't do anything
Create the required action, and do not put it in any of the sequences. The custom action should set some property, say SerialNumberValid to 1 or 0, based on whether the serial number is valid or not. See MsiSetProperty documentation for setting properties.
Go to the dialog view to the dialog where you are validating the serial number and go to the Behavior tab (it opens when you click the + sign of the dialog)
Choose the Next button, and delete the entries that are there
Add a new behavior to run your CA
Event -> DoAction
Argument -> (Name of your CA)
Condition - (Leave it blank)
Add one behavior for the success dialog
Event -> NewDialog
Argument -> (Name of your success dialog)
Condition - [SerialNumberValid] = "1"
Add one behavior for the failure dialog
Event -> NewDialog
Argument -> (Name of your failure dialog)
Condition - [SerialNumberValid] <> "1"
Make sure that the CA entry is the first one. The actions are processed top-down.
Also verify that your Back and Next buttons on the preceding and next dialogs point to the right dialogs, otherwise you'll end end with buttons that don't do anything