InstallShield 2019 » InstallScript Language Reference
Project • This information applies to the following project types:
• | InstallScript |
• | InstallScript MSI |
/*--------------------------------------------------------------*\
*
* InstallShield Example Script
*
* Demonstrates the SdAskDestPath function.
*
* SdAskDestPath is called to prompt the user for a path.
* Then the selected path is assigned to the system variable
* INSTALLDIR, which is displayed in a message box.
*
\*--------------------------------------------------------------*/
#define TITLE_TEXT "SdAskDestPath Example"
// Include Ifx.h for built-in InstallScript function prototypes.
#include "Ifx.h"
function OnBegin()
STRING svDir;
begin
// Disable the Back button in setup dialogs.
Disable (BACKBUTTON);
// Set default folder name for call to SdAskDestPath.
svDir = "C:\\ISEXampl\\Target";
// Display the SdAskDestPath dialog. Pass a null string
// in the second parameter to display the default message.
if (SdAskDestPath (TITLE_TEXT, "", svDir, 0) = NEXT) then
INSTALLDIR = svDir;
endif;
// Display the new target directory.
SprintfBox (INFORMATION, "SdAskDestPath", "Successful.\n\nThe Target " +
"directory is: " + INSTALLDIR);
end;
InstallShield 2019 Help LibraryApril 2019 |
Copyright Information | Flexera |