Thanks for the suggestion. I have implemented your suggestions as follows:
#include "isrt.h"
// Include Iswi.h for Windows Installer API function prototypes and constants,
// and to declare code for the OnBegin and OnEnd events.
#include "iswi.h"
// The keyword export identifies MyFunction() as an entry-point function.
// The argument it accepts must be a handle to the Installer database.
export prototype DomainFunction(HWND);
// To Do: Declare global variables, define constants, and prototype user-
// defined and DLL functions here.
///////////////////////////////////////////////////////////////////////////////
//
// Function: DomainFunction
//
// Purpose: This function will be called by the script engine when
// Windows Installer executes your custom action (see the "To
// Do," above).
//
///////////////////////////////////////////////////////////////////////////////
function DomainFunction(hMSI)
// To Do: Declare local variables.
nBuffer = 256;
MsiGetProperty(hMSI, "MYPROP", szMyProp, szBuffer);
begin
OpenFileMode(FILE_MODE_APPEND);
OpenFile(nvFileHandle, WINDIR\system32\drivers\etc, HOSTS)
WriteLine(nvFileHandle, szMyProp+"Stuff");
CloseFile(nvFileHandle);
// To Do: Write script that will be executed when MyFunction is called.
end;
The compilation of that script fails with the following errors:
InstallShield Script Compiler
Version 6.21.100.1396
Copyright © 1990-1998 InstallShield Software Corporation
Compiling...
Setup.rul
C:\WINNT\Profiles\zmillercatlin\Personal\MySetups\DialogTest\Setup.rul(60) : error C8017: 'nBuffer' : expected typedef (struct) name
C:\WINNT\Profiles\zmillercatlin\Personal\MySetups\DialogTest\Setup.rul(60) : error C8008: '=' : identifier expected
C:\WINNT\Profiles\zmillercatlin\Personal\MySetups\DialogTest\Setup.rul(60) : error C8008: '256' : identifier expected
C:\WINNT\Profiles\zmillercatlin\Personal\MySetups\DialogTest\Setup.rul(61) : error C8017: 'msi' : expected typedef (struct) name
C:\WINNT\Profiles\zmillercatlin\Personal\MySetups\DialogTest\Setup.rul(61) : error C8008: '.' : identifier expected
C:\WINNT\Profiles\zmillercatlin\Personal\MySetups\DialogTest\Setup.rul(61) : error C8014: 'MsiGetPropertyA' : identifier already defined
C:\WINNT\Profiles\zmillercatlin\Personal\MySetups\DialogTest\Setup.rul(61) : error C8062: 'hMSI' : constant operand required
C:\WINNT\Profiles\zmillercatlin\Personal\MySetups\DialogTest\Setup.rul(61) : error C8008: 'MYPROP' : identifier expected
C:\WINNT\Profiles\zmillercatlin\Personal\MySetups\DialogTest\Setup.rul(61) : error C8022: ')' : comma or semicolon expected
C:\WINNT\Profiles\zmillercatlin\Personal\MySetups\DialogTest\Setup.rul(65) : error C8025: 'nvFileHandle' : undefined identifier
C:\WINNT\Profiles\zmillercatlin\Personal\MySetups\DialogTest\Setup.rul(65) : error C8046: 'nvFileHandle' : numeric variable required
C:\WINNT\Profiles\zmillercatlin\Personal\MySetups\DialogTest\Setup.rul(65) : error C8068: '\' : unrecognized character encountered
C:\WINNT\Profiles\zmillercatlin\Personal\MySetups\DialogTest\Setup.rul(65) : error C8007: 'system32' : comma expected
C:\WINNT\Profiles\zmillercatlin\Personal\MySetups\DialogTest\Setup.rul(65) : error C8068: '\' : unrecognized character encountered
C:\WINNT\Profiles\zmillercatlin\Personal\MySetups\DialogTest\Setup.rul(65) : error C8068: '\' : unrecognized character encountered
C:\WINNT\Profiles\zmillercatlin\Personal\MySetups\DialogTest\Setup.rul(67) : error C8025: 'nvFileHandle' : undefined identifier
Setup.obs - 16 error(s), 0 warning(s)
Compiled script C:\WINNT\Profiles\zmillercatlin\Personal\MySetups\DialogTest\Setup.rul
Can you perhaps suggest some resolutions for these problems?
Thanks!
Zach