Summary
create a required field in a dialog for InstallShield.Synopsis
This Knowledge Base article will show you how to add a required field to your custom Windows Installer dialog. For example, if you're looking to create an edit field that requires text before moving to the next dialog, this article will show you how you can implement this.Discussion
There is no way to set an option that will toggle an edit field into a required text field, however with a custom action and some InstallScript we can prevent the next dialog from being advanced and display a message asking for the field to be populated.
1) What you'll want to do is create a InstallScript function that calls MsiGetProperty() on the property(ex TEXT) that the edit field populates. You can create an InstallScript function under Behavior and Logic->InstallScript. Then in the middle pane right click Files->New Script File. A function MyFunction() should be created in the setup.rul. In the function you'll want to check if the edit field's property(value returned by MsiGetProperty) is empty or populated and then do MsiSetProperty() on a second property(ex ADVANCENEXT) that will determine whether or not the dialog should advance.
2) Next associate the created installscript function with a custom action. This can be done in th Custom Actions and Sequences view, right click Custom Actions in the middle pane and New InstallScript. Set the Function Name to the name of the function created in Step 1).
3) Setup the message to be displayed when field is empty. Create another InstallScript function that calls the InstallScript funtion MessageBox() and associate that with another custom action.
4) Navigate to the dialog with the edit field under the Dialogs view, go to its behavior. Add a condition to the NewDialog event on the Next PushButton that validates against the second Property(ex ADVANCENEXT). Add a DoAction event before the NewDialog that calls the custom action created in Step 2. Also add a DoAction to call the MessageBox custom action of Step 3 with a condition that validates against the second Property (ex ADVANCENEXT).
5) You'll also want to initialize the edit field property(ex TEXT) in Property Manager to an empty value.
In essence, when the Next button is pushed it will call a custom action that checks to see if the Text field is empty and sets a property that allows/prevents advancement.
Additional Information
Here is example code for the InstallScript Custom action.
MsiGetProperty(hMSI,"TEXT",szValue,szSize);
if (szValue = "") then
SprintfBox(INFORMATION,"Enter Text","Please Enter a Value for the Text Field");
MsiSetProperty(hMSI,"ADVANCENEXT","0");
else
SprintfBox(INFORMATION,"Value Set","Value Set");
MsiSetProperty(hMSI,"ADVANCENEXT","1");
endif;
if (szValue = "") then
SprintfBox(INFORMATION,"Enter Text","Please Enter a Value for the Text Field");
MsiSetProperty(hMSI,"ADVANCENEXT","0");
else
SprintfBox(INFORMATION,"Value Set","Value Set");
MsiSetProperty(hMSI,"ADVANCENEXT","1");
endif;
Was this helpful?
Related Articles
How to create a required field in Suite 4Number of Views Legal entities for employees & legal entity as a required field 8Number of Views How To: Create HotKeys in a Dialog box 4Number of Views InstallAnywhere can not Create the Software Identification Tag Because the Required Fields are Missing Under Project > Sof… 7Number of Views How to make Product Catalog Field in Request Form as Required 3Number of Views
Revenera Assistant
Online
Hi, I am Reva - Ask me anything.
Updates
No new updates
Chat
Home
Updates
/**/
Thanks for the feedback!
Your feedback has been saved.Rate this response:
1
2
3
4
5
Add Additional feedback ( Optional )
0/240
English
English
Language changed successfully
Something went wrong
Email sent successfully
Something went wrong
Case create successfully
Are you sure you want to cancel
the case creation?
Please select a product to submit the case.
Please select a product version to submit the case.
0/255
Upload Attachment
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to cancel the case creation?
Case closed successfully
File Upload
Maximum file size allowed is 3 MB.
File type not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
© 2026 Flexera Software. All Rights Reserved.
Case id: 00001065
Activity: Status change: 2 hours ago