InstallShield 2019 » InstallScript Language Reference
Project • This information applies to the following project types:
• | InstallScript |
• | InstallScript MSI |
/*--------------------------------------------------------------*\
*
* InstallShield Example Script
*
* Demonstrates the SdShowInfoList function.
*
* This script calls GetSystemInfo to retrieve information about
* the user's system. The ListAdd function is used to add the
* information to a string list, which is displayed by
* calling SdShowInfoList function.
*
\*--------------------------------------------------------------*/
#include "Ifx.h"
function OnBegin()
STRING szTitle, szMsg, svReturn, szInfo;
NUMBER nvReturn;
LIST listInfo;
begin
// Create a list to hold system information.
listInfo = ListCreate (STRINGLIST);
// Check if the system has a CD-ROM drive.
GetSystemInfo (CDROM, nvReturn, svReturn);
if (nvReturn = TRUE) then
szInfo = "Your machine has a CD-ROM Drive.";
else
szInfo = "Your machine does not have a CD-ROM drive.";
endif;
// Add the CD-ROM info to the list.
ListAddString (listInfo, szInfo, AFTER);
// Check the time on the system.
GetSystemInfo (TIME, nvReturn, svReturn);
Sprintf (szInfo, "The time now is %s.", svReturn);
// Add the time to the list.
ListAddString (listInfo, szInfo, AFTER);
// Disable the Back button in setup dialogs.
Disable (BACKBUTTON);
// Set up title and message parameters for call to SdShowInfoList.
szTitle = "SdShowInfoList Example";
szMsg = "Following is some information related to your system:";
// Display the information.
SdShowInfoList (szTitle, szMsg, listInfo);
end;
InstallShield 2019 Help LibraryApril 2019 |
Copyright Information | Flexera |