1

So I have the following code and anytime it is called it appears behind everything else. Does anybody have any idea of how I can make sure this prompt shows up at the front every time?

sPromptA = "Question that is asked to user";

MODE = NORMALMODE;

if (NO = AskYesNo(sPromptA, NO)) then
    MODE = SILENTMODE;
2
  • Which Windows version are you using? I see this a problem with 8.1, not with 8.0 or Win7 though...maybe I'm wrong though
    – JohnZaj
    Commented Mar 24, 2014 at 22:51
  • It actually happens on most versions of Windows. Vista, 7, XP but I don't think I tried it on 8.
    – Sam
    Commented Mar 27, 2014 at 12:07

1 Answer 1

2

You can work around this:

HWND hRecord;
sMsg = "my message";

hRecord = MsiCreateRecord(1);
MsiRecordSetString( hRecord, 0, sMsg);
nYesNoResult = MsiProcessMessage(hMSI, INSTALLMESSAGE_USER + MB_YESNO, hRecord);
MsiCloseHandle(hRecord);

if (nYesNoResult = 6) then //6=yes 7=no
  //do something
endif;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.