Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Newbie Question


2 replies to this topic

viponly

viponly
  • Members
  • 3 posts

Posted 17 November 2005 - 18:47

'm a totally newbie when it comes to InstallShield. I'm scheduled to go to training in February and the books are ordered. I'm reading through the built-in functions section in the help file and I came across the AskYesNo function. I copied the example code they had in to the InstallScript section of InstallShield right below #include "ifx.h". When I compile the script I don't get the Yes Or No box. Can someone please tell me what I am doing wrong? Here is the whole script.

//===========================================================================
//
// File Name: Setup.rul
//
// Description: Blank setup main script file
//
// Comments: Blank setup is an empty setup project. If you want to
// create a new project via. step-by step instructions use the
// Project Assistant.
//
//===========================================================================

// Included header files ----------------------------------------------------
#include "ifx.h"

/*--------------------------------------------------------------*\
*
* InstallShield Example Script
*
* Demonstrates the AskYesNo function.
*
* This script asks the user whether or not to display the
* ReadMe file. If yes, the script launches the Windows
* Notepad to open a ReadMe file.
*
* Note: Before running this script, set the preprocessor
* constants so that they reference the fully qualified
* names of the Windows Notepad executable and a valid
* text file on the target system.
*
\*--------------------------------------------------------------*/

#define PROGRAM "C:\\Windows\\Notepad.exe"
#define PARAM "C:\\Windows\\Readme.txt"

// Include Ifx.h for built-in InstallScript function prototypes.
#include "Ifx.h"

export prototype ExFn_AskYesNo(HWND);

function ExFn_AskYesNo(hMSI)
begin

// Display the AskYesNo dialog box. The default is set to Yes.
if (AskYesNo("Installation complete. Would you like to read the Readme " +
"file now?", YES) = YES) then
LaunchApp(PROGRAM, PARAM);
endif;

end;

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 17 November 2005 - 22:57

You need to call your function in one of the event handlers.

viponly

viponly
  • Members
  • 3 posts

Posted 18 November 2005 - 03:43

Thank you for the help.