INSTALLSHIELD internal library function 4 internal dialog function
The following functions create a simple dialog, such as the Yes / NO dialog, and message box. Some functions allow you to simply display various types of public dialogs.
There is a CANCEL button internal dialog box does not return the Cancel (2) value when the button is selected. Instead, call the currently defined exit handler.
Note: As the default, INSTALLSHIELD Professional 6 Displays the final user dialog in Windows 2000 style, which follows the latest guidelines for Microsoft's Microsoft's Microsoft in the Windows User Interface. To display the Windows 95-style dialog box, the user needs to do the following:
By renaming or moving to other folders, the
Copy the file _isres.old from
Change the file name _isres.old for Isres.dll.
Click Building Toolbar Build Toolbar 'to build the current media button Build Current Media or from the creation menu to create
The specific functions include the following:
AskDESTPATH
Display a dialog that requires target path information.
AskOPTIONS
Display a dialog prompting the end user to select an option by checking the box or a radio button.
AskPATH
Display prompts the end user to enter a dialog box.
AskText
Display a dialog that prompts the end user into the text.
AskYESNO
Show a dialog that prompts the end user to respond to the problem by clicking YES or NO.
ComponentDialog
Display a dialog box allows the end user to select components and specify a target location.
Enterdisk
Display a dialog prompts the end user to specify a specified disk.
Messagebox
A message is displayed in the dialog box.
RebootDialog
Display a dialog box allows the end user to select rebooting Windows or restart your computer.
Selectdir
Display a dialog allows the end user to select a folder. Selectdir creates this folder when the folder does not exist.
SelectDirex
Display a dialog allows the end user to select a folder.
SELECTFOLDER
Display a dialog allows the end user to select a folder from the program folder list.
SetupType
Display a dialog that allows the end user to choose typical, easy, custom installation.
Sprintfbox
Returns a formatted string consisting of one or more characters, numbers, or string values.
Welcome
Display the welcome information dialog box.
4.1 AskDestPath
Syntax: AskDestPath (Sztitle, SZMSG, SVDIR, NRESERVED);
Description: The AskDestPath function displays a dialog that allows the end user to specify the target folder installed in the installation in the installation. The dialog also includes a browsing button that allows the end user to select an existing folder or specify a new folder. Note that the final user selected folder must be written; the unmanable folder is not accepted. If you want the end user to choose a folder that cannot be written, call the AskPath function.
To open the Select Folder dialog from the Select Target Location dialog, the end user must click the Browse button. Select the folder dialog Display all valid folder lists. End users can choose an existing folder or enter a new folder name. If the end user enters a folder name that does not exist, the folder is created. parameter:
Sztitle
Specifies the dialog title. To display the default title ("Select Target Position"), pass an empty string to this parameter.
SZMSG
Specifies the message to display. In order to pass multi-line static text at this parameter, the new row converter sequence (/ N) is inserted in the row. To display the default instruction of the dialog, pass the empty string ("") to this parameter.
svdir
Specifies the default path displayed when the dialog is opened; returns the path to the folder to the end user selected. For more information, please see the annotations below.
NRESERVED
The value of this parameter must be 0.
return value:
Next (1): Indicates that the next button is selected.
BACK (12): Indicates the Back button being selected.
annotation:
• If the default folder specified by svdir does not exist in the end user system, it will not be created unless the end user presses the selection button and creates it from the Select Folder dialog box. Therefore, when a user specifies a default folder that wants to call ComponentTransferData (it is necessary to create folders when necessary), the user must call EXISTDIR to determine if the folder exists when the AskDestPath returns. If it does not exist, call CREATDIR to create it in the end user system. Note that a installer running an event-based script automatically calls ComponentTransferData.
• Running a Silent Mode installer, if the default folder does not exist, you must create it before calling AskDestPath.
4.2 AskOptions
Syntax: AskOptions (Nvalue, Szmsg, Sztext1, Bvcheck1, Sztext2, Bvcheck2 [, Sztextn, Bvcheckn] [, ...,]);
Description: The AskOptiona function formats and displays the dialog box that prompts the end user to select one or more options. The default title of the dialog is "Select Components". To change the contents of the title bar, call SetDialogtitle before calling AskOptions. The dialog will display up to nine selection controls, check boxes, or radicals, depending on the NVALUE values.
parameter:
Nvalue
Specify the control to display. One of the following predefined constants in this parameter location:
Exclusive: Specify the radio button to allow the end user to select only one option.
NONEXCLUSIVE: Specifies the check box to allow the end user to select more than one option.
SZMSG
Specifies the message displayed in the dialog. You can use this message to describe options and / or requires end users to select one or more options. If the message is more than one line, use a line break (/ N) insert the interval of the row.
Sztext1
Specifies a text tag for up to 47 letters, which is displayed adjacent to the first check box or a radio button. In order to establish a shortcut, a "and symbol" (&) is inserted before the user specified by the purpose. This letter with underscore display indicates its function. For example, custom ALT C is shortcut, passing "& customer". Custom ALT S is shortcut, pass "CU & Stom".
Bvcheck1
The first selection box or the initial state of the first selection box or the radio button when the dialog is turned on; the dialog is turned off. The following constant is passed in this parameter location: The first selection box or a radio button is selected.
FALSE: The first selection box or the radio button is not selected.
Sztext2
Specifies the up to 47 letters of up to 47 letters of the second selection box / radio button. Create a shortcut method with SzText1.
Bvcheck2
The specified dialog box is turned on the initial state of the second selection box or the radical button; the dialog is turned off, returns the state of the second selection box or the radical button. Transfer the following constants in this parameter:
True: The second selection box or the radio button is selected.
FALSE: The second selection box or the radio button is not selected.
You can define up to seven additional options. Each additional option is indicated by a pair of parameters: a string parameter defines an option status when a tag and a numeric variable definition askOptions returns. To set the initial state of an option, assign a value to TRUE or FALSE before calling AskOptions.
If NVALUE is Exclusive and an initial state set for an option setting is set to true, askOptions will preselect the first option to set the parameter sequence of True.
return value:
Next (1): Indicates that the next button is selected. The status of the control is returned by each Bvcheck variable.
Back (12): Indicates that the Back button is selected. The state of control is returned by each BvCheck variable.
4.3 askpath
Syntax: askPATH (SZMSG, SZDefpath, SvResultpath);
Description: The askpath function specifies a dialog that prompts the end user to enter the path to the target location. The dialog includes a single line editing area where you can display a default path here. End users have three options:
Accept the default path
Edit the default path
Display Select Folder Choose Folder dialog box to select a folder
The default title of the conversation is to select the target location. Choose destination location. To change the title, call SetDialogtitle before calling askPATH. Askpath does not check the existence of the end user input path. Call the askpath and call CREATDIR to create the path.
parameter:
SZMSG
Specifies the message displayed in the dialog. To display the default finger of the dialog, pass the empty string ("") to this parameter.
Szdefpath
Specifies the default path displayed in the editing area. End users can modify the string.
SvResultPath
Returns the result path name, whether the user accepts the default path, modify it, or select an optional path from the Select Folder Choose Folder dialog box. Askpath adds a backslash at the end of the path, and then assigns it to SvResultpath. If necessary, you can delete the backslash by calling StrResultPath after the Askpath returns. If the user presses the back button, the value of SvResultPath will not be predictable. Therefore, if the user uses the same variable in SZDefPath and SvResultPath, ensure that the variable is initially initialized when the return value of the AskPath is back.
return value:
Next (1): Indicates that end users choose the Next button.
Back (12): Indicates that the end user selects the Back button; SvResultPath is set to an empty string ("").
annotation:
• The editing area displayed in the dialog can be scrolled to accommodate the long string.
• Since the number of characters that can be input to the editing area is not limited, the user must explain the variables transmitted by the SvResultPath in an unregulated. If the string variable is not sufficient to store the text you entered, the string will be tailing and displaying an error message. Also note that this function adds a backslash and an empty end in the end of the string, and the length of the string is at least two characters longer than the path input. · This function will accept a folder that exists but not writable. To limit the end user, you can only select a writable folder, you can call the AskDestPath function to replace.
4.4 Asktext
Syntax: Asktext (Szques, Szdefault, SvResult);
Note: The AskText function displays a dialog that includes a static text area and an edit box. Parameters szquest The default text of the static text area; the parameter szdefault specifies the default text of the edit box. The default title of this dialog is the input information Enter Information. To change the content of the title bar, call SetDialogtitle before calling AskText.
parameter:
Szquestion
Specifies the issues or declarations to display. If the string length of the parameter location exceeds the static text area width, one or more row separators will be inserted into the string so that it is displayed in a dialog box. If you prefer, the user can manually format the string by inserting a newline (/ N). This parameter does not have a default.
SZDefault
Specifies the default text of the editing area.
SvResult
When the NEXT button is used to close the text, the text entered by the end user is returned. If the user presses the Back button, the svresult value will not be predictable. Therefore, if the user uses the same variable in SZDefPath and SvResultpath, it is necessary to ensure that the variable is initially initialized when the return value of the Askpath is Back.
return value:
Next (1): Indicates that the next button is pressed.
Back (12): Indicates that the Back button is pressed.
annotation:
· The string variable passed by the user in SvResult must be large enough to accommodate the text input to the editing area. Therefore, the user must declare the variable using the method of automatically adjusting the size.
· When necessary, the editing area will scroll to accommodate a long string.
4.5 Askyesno
Syntax: askYESNO (SzquesNo (szquestion, ndefault);
Description: The AskyesNO function presents a message box that displays a problem, and the end user can answer it by clicking the YES or No button. Askyesno message contains four contents:
. Problem tag icon. Problem text. Yes button. NO button
The default title is Question. To change the content of the title bar, call SetDialogtitle before calling AskyesNo.
The Askyesno message box is created by directly calling the corresponding Windows API function, which displays a system modal dialog. Since the dialog is displayed by Windows, the text on the button cannot be changed by the installation. English version of the text 'yes' or 'NO' will be displayed by Windows to a language that is suitable for the installed Windows version. If the user needs to display another flexible dialog box, call a Windows API function or use a custom dialog.
parameter:
Szquestion
Specifies the problem that is displayed in the message box. If the message exceeds a row, embed a wrap (/ n) in the message to insert the row interval.
NDEFAULT
Specifies the default selected button. One of the following predefined constants in this parameter location:
YES: The yes button is highlighted when the dialog is turned on.
NO: The NO button is highlighted when the dialog opens.
return value:
YES (1): Indicates that the user selects the YES button.
NO (0): Indicates that the user selects the NO button. 4.6 ComponentDialog
Syntax: ComponentDialog (Sztitle, SZMSG, SVDIR, SZComponent);
Description: The ComponentDialog function displays a dialog that allows the end user to select one or more from the component list on the current media. Users can also choose a target location.
If your installation does not use a installation type conversation, the user must call the ComponentTypeset before calling ComponentDialog to specify the type of installation already defined in the IDE Installation Type pane.
The name of the current media is stored in the system variable Media. In the installation initialization, INSTALLSHIELD assigns the MEDIA to the default media name ("data"), which is associated with the user file media library (Data1.cab). When displaying the components created by the script, follow these steps:
Save the current value of Media
Assumpted the name of the script to Media
Call ComponentDialog to get the option of end users
Assign the value of step 1 to Media
The value of the system variable MedIa is set to 'data' in the installation initialization. If the user changes the value of the variable to reference the component group created by the script, the user must change the value back to 'data' before calling ComponentTransferData, CreateShellObjects or CreateRegistrySet. Note that the ComponentTransferData is automatically called in an installation of an event-based script.
Click the Browse button to install into the Select Folder Choose Folder dialog box, display the existing folder list. End users can choose an existing folder or enter a new folder name. ComponentDialog returns the selected folder name at SVDIR.
If the user enters a folder that does not exist, a message box will appear to ask if the end user wants to create this folder. If yes, INSTALLSHIELD creates a specified folder.
parameter:
Sztitle
Specifies the dialog title. To display the default title ("Select Component Select Components), pass an empty string (" ") to this parameter.
SZMSG
Specifies the message displayed in the dialog. For example, the message may be "Please select one or more of the following components" "" "" "" "" "" "" "" "" "" " To display the default indication of the dialog, the parameter passes an empty string ("").
svdir
Specifies the default target location. Returns the folder selected by the end user. Note that the location value returned by SVDIR does not affect file transfer Unless the user assigns it to the system variable targetdir or calls the ComponentSetTarget to link it and a user-defined variable.
We recommend that users deliver TargetDir to this parameter instead of a string variable. If you don't pass Targetdir at this parameter, the desired disk space that is displayed in the dialog box when the end user selects a goal in a different drive.
Szcomponent
The component is specified, and its sub-components are displayed for selection. Passing an empty string ("") to display all top components.
ComponentDialog finds the required components specified by the system variable media in the component group created by the file media library or script.
return value:
Next (1): Indicates that end users choose the Next button.
BACK (12): Indicates that the end user selects the Back button.
<0: The ComponentDialog dialog is not displayed. Call ComponEnTerror View additional information. annotation:
• The component size is displayed in 0 until it is selected. Once it is selected, its actual size is displayed.
• If necessary, the component name is cut to display the maximum possible component size. The necessary space of displaying the size depends on the component maximum size itself (2GB), the currently used component size option, and fonts used to display component information in the dialog box. The component size option is set by the DialogsetInfo function. Once the space you need to display the maximum size is determined, all component names are truncated to accommodate the remaining space if necessary. This ensures that the component name does not overwrite the component size. Note that the name of the component that requires less space display size (or no selected) under this method will still be cut. In order to maximize the execution and ensure that the component name is complete, the component name is smaller than the effective space in the Component dialog box.
• If the default folder specified by svdir does not exist in the end user system, it will not be created Create it from the Select Folder dialog box unless the end user presses the browsing button and follows the steps below. Therefore, whenever the user wants to specify a default folder to use before calling ComponentTransferData (if necessary, it creates folder), in order to determine if the folder exists, EXISTDIR must be called when ComponentDialog returns. If there is no existence, call CreatDir creates it on the end user system.
• Running in a stationary manner If the folder where the componentdialog is called, there is no need to create the new folder. This ensures that the confirmation dialog is not displayed. Without this step, two responding files are needed to handle two possible situations.
4.7 Enterdisk
Syntax: Enterdisk (SZMSG, SZTagfile);
Note: The Enterdisk function displays a dialog that prompts the end user to insert the next disk. The default title is to install the next disk. To change the title, call SetDialogtitle before calling Enterdisk. The system variable srcdir contains the default path, which is displayed in the dialog box. End users can modify the default path and modify the SRCDIR value by entering a new path and clicking OK.
Enterdisk recognizes the correct disk by identifying the correct disk by the label file specified by SZTagfile. If the disk does not include the tag file, there will be an error message prompting the user to enter the correct disk.
parameter:
SZMSG
Specifies the message prompting the user to insert the correct disk.
Sztagfile
Specifies the label file name. Enterdisk finds the file on the disk. If the file is not found, a message is displayed asking the user to insert the correct disk. If the user passes an empty string (""), the function does not find any files; it is assumed to have the correct floppy disk installed.
return value:
OK (1): Indicates that the user selects the OK button.
<0: Indicates that an undetermined error has occurred.
annotation:
· InstallShield Media Builder does not automatically generate tag files on disk image folders. To use tag files, add them to the created disk image folder.
4.8 MessageBox
Syntax: MessageBox (SZMSG, NTYPE);
Note: The MessageBox function presents a dialog that contains a message, an icon (information, warning, or serious warning) indicating the message natural property, and an OK button. The default title depends on the ntype value, the ntype value also indicates the icon type. To change the content of the message box title bar, call SetDialogtitle before calling MessageBox.
parameter:
SZMSG
Specifies the message to display. InstallShield does not automatically divide the message text as a separate row to fit the message box. If the message is longer than one line, the row interval is inserted into the line break (/ N) in the appropriate position of the string. NTYPE
Specifies the message box type to be created and the icon type displayed in the message box. One of the following predefined constants in this parameter location (Display Explorer Object Handling Object):
Information Warning Severe
Any Windows API MessageBox type can also be specified at this parameter. A variety of styles can be logically or to generate the desired MessageBox type (see the following).
return value:
The return value is meaningless unless you use a standard Microsoft Windows message box style. If you use these styles, the return value, and the return value of the MessageBox API function.
annotation:
· This function uses Microsoft Windows API MessageBox. Operating environment, rather than installshield, determines the size and location of the message box (for example, the language where the operating system is running). You can change the text of the button. Consider using more information on the Windows Messagebox type, please consult the Messagebox Windows API function in the appropriate Windows SDK.
· Pay attention to the following cases when using the Windows message box.
• Windows MessageBox type constants are declared in the Windows.h file, which cannot be included in the InstallShield script. When these constants are used, the user must define them (using #define) in the declaration area of the installation script. Values assigned to these constants are usually found in the included files provided by a suitable Windows SDK or development tool. For Microsoft Visual C , most constants can be found in the Winuser.h file, which is located in the DevStudio / VC / INCLUDE folder.
• Windows and InstallShield message box constants cannot be used together in one installation. If an installshield message box is often used with a Windows message box, the constant of Windows message box will be ignored.
· Some Windows message box style is not supported in some Windows platforms. To determine if a specific style is supported by the installed operating system, consult the appropriate Windows SDK.
• When the MessageBox function uses a Windows message box style, the title of the message box is "Installation". If the user needs to display a different title, the sprintfbox function can be used instead.
4.9 RebootDialog
Syntax: RebootDialog (SZTITLE, SZMSG, NDEFCHOICE);
Description: The RebootDialog function displays a dialog that allows the end user to restart your computer. The selected option is executed at the last installation.
parameter:
Sztitle
Specifies the dialog title. To display the default header ("Restart"), pass an empty string ("") to this parameter.
SZMSG
Specifies the message displayed by the dialog. To display the default indication of the dialog, the parameter passes an empty string ("").
NDEFCHOICE
Specifies the default selected radical button content. One of the following predefined constants in this parameter location:
SYS_BOOTMACHINE: Restarts Computer Options ("Yes, I Want To Restart My Computer Now.") Will become the default radio button selection content.
0: Do not restart the computer option ("NO, I will restart my computer.") Will become the default radio button content. return value:
Will_reboot: Indicates that the user selection label is the radio button of "Yes, I Want To Restart My Computer Now."
0: Indicates that the user selection label is the radio button of "NO, I will restart my computer later.".
annotation:
• When you bring a SHAREDFILE or LOCKEDFILE option to call a function and lock the encountered .dll or .exe file, the updated version of the locked file is copied to the target system and the system variable batch_install is set to TRUE. RebootDialog Automatically submits the locked files when the system is restarted to update, unless the user selects "NO, I WILL RESTART My Computer Later." Option.
• A perfect candidate for the RebootDialog function is SDFINISHREBOOT, which is better than the RebootDialog dialog.
· Because INSTALLSHIELD will try to restart the system when INSTALLSHIELD is running, the user must ensure that all other installshield instances stop execution before calling rebootdialog. In addition, you give users a message to ensure that all other applications are stopped before restarting the system.
4.10 Selectdir
Syntax: Selectdir (Sztitle, SZMSG, SVDIR, BCREATE);
Description: The SelectDir function displays a dialog that allows the end user to specify the folder that the application will be installed. End users can enter a fully qualified folder name or select an existing folder from the list. If the end user enters an invalid folder name or an unlimited folder name, a message box prompts the end user to enter a valid name. Select the full qualification of the folder to return to SVDIR.
If the specified folder does not exist and the parameter bcreate is True, displaying a message box asks if you want to create a folder. If the end user clicks Yes, selectdir automatically creates the specified folder. If the parameter bcreate is set to false and a unsaved folder is selected, the end user does not defend it, and selectdir does not create it. In this case, the user handles the option included in the SVDIR.
When the end user clicks rendered in the dialog box in the dialog box displayed by AskDestPath, SdaskDestPath, and other installshield functions displayed by a folder name.
parameter:
Sztitle
Specifies the dialog title. To display the default title ("Select Folder"), pass an empty string ("") to this parameter.
SZMSG
Specifies the message that the user wants to display in this dialog. To display the default indication of the dialog, the parameter passes an empty string ("").
svdir
Specifies the folder name that will be displayed as the default option. Returns the full qualification of the folder selected by the end user.
BCREATE
Specify whether you require InstallShield to create it when the specified folder does not exist. One of the following predefined constants in this parameter location:
True: Indicates that if the folder does not exist, you need to be created.
FALSE: Indicates that if the folder does not exist without being created.
return value:
IDOK (1): Indicates that the OK button is pressed.
IDCANCEL (2): Indicates that the CANCEL button is pressed.
<0: Indicates that the function does not display the dialog and / or cannot create a folder.
4.11 SelectDirex
Syntax: SelectDirex (Sztitle, Szmsg, SzeditBoxStaticText, sztreeControlStaticText, nflags, svdir); Description: SelectDirex Displays a dialog box, allowing end users to select an existing folder from a tree control with a folder. An edit box is also displayed allows the end user to specify a new folder.
This function calls the Windows API function shbrowserForFolder to display the dialog. For more information on SHBROWSEFORFOLDER, you can view Win32 SDK or Access
Http://msdn.microsoft.com/library/ sdkdoc / shellcc / shell / function s / shbrowseforfolder.htm.
parameter:
Sztitle
Specifies the dialog title. To display the default title ("Select Folder"), pass an empty string ("") to this parameter.
SZMSG
Specifies the message that the user wants to display in this dialog. To display the default indication of the dialog ("Please select the installation folder"), pass an empty string ("") to this parameter.
SzeditboxStaticText
Specify static text accompanying the edit box when NFLAGS is Bif_editbox. If NFLAG does not specify Bif_EDitbox, this parameter is ignored.
SztreeControlStaticText
When NFLAGS specifies Bif_Statustext, specify the static text of the tree control with the dialog box. If NFLAGS does not specify bif_statustext, this parameter is ignored.
NFlags
Specifies the appearance and function of the dialog box that is displayed. Pass any of the following constants:
Bif_BrowseForComputer: Allows end users to select a particular computer on the network. When the constant is passed, the dialog has the following behavior (performance):
The "Network Neighbor" folder is preselected in the tree control.
The OK button is activated only when a valid computer name in the tree control is selected.
Even if bif_editbox is specified, the edit box is not displayed.
Bif_BrowseforPrinter: Allows end users to choose a particular printer. When the constant is passed, the dialog has the following behavior:
The "Network Neighbor" folder is preselected in the tree control.
Only those computers including at least one printer are displayed in the network neighbor folder.
The OK button is activated only when a valid printer in the tree control is selected.
Even if bif_editbox is specified, the edit box is not displayed.
Bif_dontgobelowdomain: The network folder under the domain layer is not displayed in the tree control.
Bif_ReturnFSANCESTORS: If any object other than a file system ancestor is selected, the OK button is disabled.
Bif_Returnonlyfsdirs: A folder in a part of a non-file system is selected to be disabled. .
Other features of the following constants specify the dialog:
Bif_editbox: Display an edit box allows the user to enter a folder name, display the text in SzEditboxStaticText on the top of the Edit box (unless the Bif_BrowseForComputer or Bif_BrowseForPrinter) is specified. When the end user clicks OK, SelectDirex checks if a valid folder name is entered. If not (for example, if the name containing invalid characters), an error message is displayed and the dialog is not eliminated. Unlike ShbrowseForfolder, SelectDirex supports this constant for all InstallShield support. Bif_Statustext: SztreeControlStaticText is displayed in the upper part of the tree control. Note SelectDirex does not support Bif_Validate and Bif_UseneWUI constants, while SHBROWSEFORFolder supports them.
svdir
Specifies the folder name as the default selection. Returns the full qualification of the folder selected by the end user. If this parameter specifies a valid folder name existing in the system, the folder is preselected in the tree control.
return value:
IDOK (1): Indicates that the OK button is pressed.
IDCANCEL (2): Indicates that the CANCEL button is pressed.
<0: Indicates that the function failed to display the dialog.
4.12 SELECTFOLDER
Syntax: SZTITFOLDER (SZTITLE, SZDEFFOLDER, SVRESULTFOLDER);
Description: The SelectFolder function displays a dialog that allows the end user to enter a program folder name in an editing area or select a program folder from a list. This function automatically displays all program folders in the system. A default folder name delivered by SVDeffolder is displayed in the editing area. Returns the selected folder name at SvResultFolder. If the specified folder does not exist, it will not be created.
parameter:
Sztitle
Specifies the dialog title. To display the default title ("Select Program Folder"), pass the parameter to the parameter ("").
SZDeffolder
Specifies the folder name displayed as the default folder.
SvResultFolder
Returns the folder name selected or specified by the end user. If the folder does not exist, you must call CreateProgramFolder to create it; SELECTFolder does not create the folder.
return value:
Next (1): Indicates that end users choose the Next button.
BACK (12): Indicates that the end user selects the Back button.
<0: Indicates that the function failed to successfully execute.
4.13 SetupType
Syntax: SetupType (Sztitle, Szmsg, Szreserved, NTYPE, NRESERVED);
Description: The SetupType function displays a dialog that allows the end user to select one of three standard installation types. Typical, simple or custom. These installation options are displayed when there is a standard description text. If you want to add other installation types or change the displayed installation type name or description, you can call SDSetUPTyPEEX.
If the end user selects and undo the components associated with the selected installation type, returns to the Installation Type dialog box, then those choices will be lost. This situation occurs because the setUPTYPE function automatically resets the default component option based on the selected installation type each time the setupType function is called.
parameter:
Sztitle
Specifies the dialog title. To display the default title ("Installation Type"), pass the parameter to the parameter ("").
SZMSG
Specify the message you want to display at the top of the dialog box. To display the default indication of the dialog, the parameter passes an empty string (""). Szreserved
Passing an empty string ("") for this parameter, not allowing other values.
NTYPE
Specify the default installation type when the dialog is opened. One of the following predefined constants in this parameter location:
Typical: Defines the default installation type to typically.
Compact: Defines the default installation type as easy.
Custom: Defines the default installation type to custom.
NRESERVED
Transfer 0 to this parameter and other values are not allowed.
return value:
Typical (301): Indicates that the typical installation type is selected.
Compact (302): Indicates that the simple installation type is selected.
Custom (303): Indicates that the custom installation type is selected.
BACK (12): Indicates the selected back button.
4.14 sprintfbox
Syntax: sprintfbox (Ntype, Sztitle, Szformat [, Arg] [, ...]);
Note: The sprintfbox function presents a message box that contains one of three icons, a title, and a formatted message. This message can contain variables formatted based on the command you entered.
Sprintfbox and Messagebox are similar, but sprintfbox allows for more elastic control over the displayed content.
parameter:
NTYPE
Specifies the icon type displayed in the message box. Pass one of the predefined constants in this parameter location (display Windows 95 icon):
Information information
WARNING warning
Severe warning
Sztitle
Specifies the message box title. To display the default title ("Error"), pass an empty string ("") to this parameter.
SZFormat
Specify a string containing a format specifier, the format specifier is for each parameter contained in the message.
arg
Specifies the parameters contained in the message, up to 10. Each format specifier in the message must have a parameter; each parameter type must match its respective format specifiers. Sprintfbox will generate a compilation error or failure at runtime:
· Specify more than ten format specifiers and parameters: Compiling errors.
· The number of parameters and format specifiers do not match. When a specifier has no corresponding parameters, the result string will include unpredictable characters in the explanatory position. When the parameters are more than the specifier, excess parameters will be inserted into the result string.
• A variable does not match its respective format specifiers. Result Strings will contain unpredictable characters in the explanatory location.
return value:
Unless you use this unit's Windows message box style (described below), the return value is meaningless.
annotation:
· This function uses Microsoft Windows API MessageBox to create a message box. The OK button of the message box contains the text generated by the operating environment. Is the operating environment instead of installshield to determine the size and location of the message box.
· Advanced developers who are familiar with the Windows API can specify anything in any style by using the native message box style constant in the parameter NTYPE. View your description of your MersSageBox or WinMessageBox in your operating environment programming manual. If you use any native message box style, the InstallShiLled Sprintfbox function will return to the return value of the Windows API. Therefore, you must use the return value of the Windows API in your script.
For example, if you pass Yes | NO | Cancel as the first parameter, the sprintfbox message box will have Yes, NO, and Cancel buttons. Each button returns a value, such as Windows API MessageBox definition, is 6 (iDyes), 7 (IDNO), and 2 (IDCANCEL). You must use the appropriate constant value in your script, as a number or as a constant as a number as a declaration area of your script. Senior developers can use MB_Style as the first parameter of the sprintfbox function instead of constant severe, warning, or information. The value of MB_Style is listed in Windows.h. You can enter the parameter nType directly, or you can use the #define preprocessing program instruction to define the constant contact with the value.
· Pay attention to the following questions when using the Windows message box.
• Windows MessageBox type constants declared in the Windows.h file, which cannot be included in an installshield script. When using these constants, you must define them (with #define) on the declaration area of the installation script. Values assigned to these constants are usually found in an inclusion file provided by the appropriate Windows SDK or development tool. For Microsoft Visual C , most constants can be found in the Windows.h file located at the DevStudio / VC / Include folder.
• Windows and InstallShield message box constants cannot be used together in one installation. If an installshield message box is often used with a Windows message box, the constant of Windows message box will be ignored.
· Some Windows message box style is not supported in some Windows platforms. To determine if a specific style is supported by the installed operating system, consult the appropriate Windows SDK.
4.15 Welcome
Syntax: Welcome (Sztitle, NRESERVED);
Description: The Welcome function displays a dialog to welcome the end user.
parameter:
Sztitle
Specifies the title of the dialog. To display the default header ("Welcome"), pass an empty string to this parameter.
NRESERVED
Transfer 0 to this parameter.
return value:
Next (1): Indicates that end users choose the Next button.
BACK (12): Indicates that the end user selects the Back button.
<0: Indicates that Welcome is unable to display the dialog.
annotation:
• In a process script, in order to insert the product name in the first paragraph of the message text of the Welcome dialog, you must call the SDProductName before calling Welcome. (In an event-based script, before the Begin event, the sdproductName is automatically called, and the product_name string table entry is parameter). If you don't use SDProductName to pass a product name, InstallShield cannot insert a product name but will insert an additional space.