What's the best way to get a message from the error table in a custom action written in C. Should I use the open database view, and view execute api's? Or is there s simplier way using one of the other record api's?
I want to get the string so that I can display it in a messagebox with the yes/no buttons.
Thanks,
Anthony
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.
Retrieving a message from the error table
Started by
anthonyh
, Oct 03 2002 14:42
2 replies to this topic
Posted 03 October 2002 - 14:42
Product Availability Developer
Avantis
Invensys Process Systems
Using InstallShield Developer 7.04 - Basic Project
Avantis
Invensys Process Systems
Using InstallShield Developer 7.04 - Basic Project
Posted 03 October 2002 - 16:16
Maybe you can create your message like this.
PMSIHANDLE hRec = MsiCreateRecord(NumberOfParams+1);
MsiSetRecordInt(hRec, 1, ErrorNumber);
MsiSetRecordString(hRec, 2, Param1);
...
...
MsiSetRecordString(hRec, N+1, ParamN);
Result =MsiProcessMessage(hMsi,INSTALLMESSAGE_USER | MB_YESNO, hRec);
if (Result == IDYES)
{
// User responded yes
}
else if (Result == IDNO)
{
// User responder no
}
PMSIHANDLE hRec = MsiCreateRecord(NumberOfParams+1);
MsiSetRecordInt(hRec, 1, ErrorNumber);
MsiSetRecordString(hRec, 2, Param1);
...
...
MsiSetRecordString(hRec, N+1, ParamN);
Result =MsiProcessMessage(hMsi,INSTALLMESSAGE_USER | MB_YESNO, hRec);
if (Result == IDYES)
{
// User responded yes
}
else if (Result == IDNO)
{
// User responder no
}
Ian Blake
(Currently Unemployed)
(Currently Unemployed)
Posted 03 October 2002 - 20:21
Thanks, that works great. Much better then what I had.
The command wasn't completely right, but close enough, I figured out the rest. The correct one is:
MsiProcessMessage( hInstall, INSTALLMESSAGE( INSTALLMESSAGE_USER | MB_YESNO | MB_DEFBUTTON2 ), hRec );
Anthony
The command wasn't completely right, but close enough, I figured out the rest. The correct one is:
MsiProcessMessage( hInstall, INSTALLMESSAGE( INSTALLMESSAGE_USER | MB_YESNO | MB_DEFBUTTON2 ), hRec );
Anthony
Product Availability Developer
Avantis
Invensys Process Systems
Using InstallShield Developer 7.04 - Basic Project
Avantis
Invensys Process Systems
Using InstallShield Developer 7.04 - Basic Project