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

messagebox popping up in background


3 replies to this topic

overlord

overlord
  • Full Members
  • 38 posts

Posted 04 August 2015 - 20:31

I have an installscript messagebox("mymessage", WARNING) that I pop up. 

The only problem is it seems to pop up behind all other windows and in a worst case scenario this happens along side the setup.exe icon disappearing from the task bar tray at the bottom.

This results in the user thinking the installer has crashed and is not doing anything at all when in reality its waiting for input from the user.

 

What can i do in the installscript to make this pop up in the foreground instead?



overlord

overlord
  • Full Members
  • 38 posts

Posted 05 August 2015 - 15:19

Ok changed it from warning to SEVERE which seems to pop it up in the front. I would prefer to have it as a warning but if this works I will take it.

 

 

EDIT --- QA reporting its still popping up in the background =/


Edited by overlord, 05 August 2015 - 16:04.


overlord

overlord
  • Full Members
  • 38 posts

Posted 05 August 2015 - 21:33

update #2 I have changed how we are doing the custom action. I am no longer calling is as part of the sequence after appsearch. 

Now it is bound to a "DoAction" on the dialog ready to install when you click the install button.

This checks to see if excel is running and SHOULD pop a dialog. only for some reason if i do the following code:

begin
	
    RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
    nvType = REGDB_STRING;
    nvSize = 256;
    svRegKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\excel.exe";
    
    RegDBGetKeyValueEx(svRegKey, "Path", nvType, svRegValue, nvSize);  
    
    MsiGetProperty(hMSI, "ProductName", svProductName, nvSize);
        
    if (Is(FILE_LOCKED, svRegValue ^ "excel.exe")) then
		MessageBox( svProductName + " cannot install while Microsoft Excel is running.  Please close Excel, then click OK to continue.", SEVERE);
		Delay (2);
	endif;
	
end;

I see no Dialog what so ever

 

If I change the Delay to an abort 


begin
	
    RegDBSetDefaultRoot(HKEY_LOCAL_MACHINE);
    nvType = REGDB_STRING;
    nvSize = 256;
    svRegKey = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\excel.exe";
    
    RegDBGetKeyValueEx(svRegKey, "Path", nvType, svRegValue, nvSize);
    MsiGetProperty(hMSI, "ProductName", svProductName, nvSize);
    
    
    if (Is(FILE_LOCKED, svRegValue ^ "excel.exe")) then
		MessageBox( svProductName + " cannot install while Microsoft Excel is running.  Please close Excel, then retry the installation.", SEVERE);
		abort;	
    endif;
	
end;

then the dialog displays and aborts the install after I click the ok button. 

 

Why does it only display if there is an abort attached? How can i make it display without aborting and then rechecking when they click install again?



overlord

overlord
  • Full Members
  • 38 posts

Posted 06 August 2015 - 19:27

I gave up and removed the dialog entirely. It now sets an msi property to true or false if its running.

I then set up some hidden text and buttons to enable and disable the install now button based on the value of the property.

 

This seems to work and bypasses the issue though I would still love to know what caused it.