cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
alec2000
Level 3

Custom dialog problem in Basic MSI

Hi,
I use a custom dialog in install script project, now it migrates to Basic MSI. I use dialog export wizard to add custom dialog in a new project (Export to Dialog File). I create a custom installscript action and try to use custom dialog:

function SetWorkDBs (svInstallINI,DBIDList)
STRING szDialogName, szDLLName, szDialog;
NUMBER nDialog, nResult, nCmdValue, nId;
BOOL bDone;
HWND hInstance, hwndParent;
begin
szDialogName = "Dialog Title";
hInstance = 0;
szDLLName = "";
szDialog = "";
hwndParent = 0;
nId = 13854;
nResult = DefineDialog (szDialogName, hInstance, szDLLName,
nId, szDialog, hwndParent,
HWND_INSTALL, DLG_MSG_STANDARD|DLG_CENTERED);
if (nResult < 0) then
MessageBox ("An error occurred while defining the dialog.", SEVERE);
bDone = TRUE;
abort;
endif;
bDone = FALSE;
repeat
nCmdValue = WaitOnDialog(szDialogName);
switch (nCmdValue)
case DLG_CLOSE:
Do (EXIT);
case DLG_ERR:
MessageBox ("Unable to display dialog. Setup canceled.", SEVERE);
abort;
case DLG_INIT:
MessageBox ("Success", SEVERE);

endswitch;
until bDone;
EndDialog (szDialogName);
ReleaseDialog (szDialogName);
end;

The dialog is not displayed because WaitOnDialog returns -1.
I try to set szDLLName = ISUSER, in this case DefineDialog returns -1 (Using degug mode I found out that there is no _isuser.dll in SUPPORTDIR during installation)
Did I make any mistakes?
Labels (1)
0 Kudos
(2) Replies
RobertDickau
Flexera Alumni

Before going down that road, is it an option to create a custom MSI dialog box? Custom InstallScript dialog boxes don't integrate very well with Basic MSI projects...
0 Kudos
alec2000
Level 3

I call custom dialog in deferred custom action (I understand that it is impossible to use MSI dialog). Now I have alternative solution: I create dialog in Visual C++ Editor and save it in resourŅe dll and include this file in component of installation. But it is not very convinient, is it possible, for example, to add this dialog in _isres.dll?
0 Kudos