Showing results for 
Search instead for 
Did you mean: 

LaunchExecutableEx returns error -43

Go to solution

I use LaunchExecutableEx in GUI application to launch telnet.exe. Since we started running this application on Windows 7 we started having some problems. The LaunchExecutableEx returns User Interface error -43 (The text shows "The operation attempted cannot be performed while a pop-up panel is active").

Has anyone experience similar problems and how did you resolve it?


0 Kudos
Message 1 of 14

By default, telnet is not installed on Windows 7, and may be that is why you are getting an error. Check the following link to see how to install telnet for Windows 7. This may fix the problem.



0 Kudos
Message 2 of 14

I apologize for not mentioning that we installed telnet and were able to use it from the DOS window prior to this error. We've see this problem on some of the Window7 Lap Tops but not on all. This is what's puzzling and I was hoping that someone else had similar problem.

0 Kudos
Message 3 of 14

I tried running the following code in CVI project after installing telnet client on my Windows 7 Professional SP1 laptop and it launched the Telnet Client as expected.


#include <utility.h>

void main(void) {  

    int handle, error;

    error = LaunchExecutableEx("telnet", LE_SHOWNORMAL, &handle);



Also, the error code you mention shold not really be returned from LaunchExecutableEx because the error code is a User Interface error code but the LaunchExecutableEx function is a Utility library function. Could you please try running the above simple code in a new CVI project and see if it works or if you get the UI error?

0 Kudos
Message 4 of 14

I have one Lap Top with Windows 7 on which this application runs fine (I am able to telnet w/o errors). I am trying to locate one that will cause this error. As I mentioned earlier, this does not happen on all Lap Tops.

I was looking at Lab Windows documentation earlier and also noticed that this error is not listed as one of the LaunchExecutableEx errors, which is puzzling to me.

0 Kudos
Message 5 of 14

Here is part of the code that calls LaunchExecutableEx and then displays returned error.


status = LaunchExecutableEx (application_ref, LE_SHOWNORMAL, &ExecHandle.crt);
       if (status < 0) {
         MessagePopup("ERROR", GetUILErrorString (status ));


If LaunchExecutableEx ( ) cannot return -43, than why GetUILErrorString( ) returns the string I listed above:


"The operation attempted cannot be performed while a pop-up panel is active".


The text also does not match exactly what I see when I look up User Interface Error codes. The help file shows:

 "This operation cannot be performed while this pop-up panel is active."


Did different versions of Lab Windows had different error messages?


If telnet.exe can run from the DOS window, can you suggest what could prevent LaunchExecutableEx( ) to successfully launch telnet.exe. Please keep in mind that this application runs fine on some Windows7 LapTops. So the problems must be in the setup.


0 Kudos
Message 6 of 14

While I cannot argue anything about the error you are recieving, I only want to highlight that passing that error code to GetUILErrorString is incorrect: that function can interpret only codes returned by User Interface library functions.

Unfortunately within CVI a universal function to get the description of any error does not exist: errors returned by a limited set of libraries can be decoded by toolbox GetGeneralErrorString function, but other libraries (among them Utility library LaunchExecutable pertains to) have overlapping error codes so that they cannot be decoded by a soingle function. The online help for each function usually gives informations about how to decode error codes.

Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
If I have helped you, why not giving me a kudos?
0 Kudos
Message 7 of 14

Thanks for reply. I understand that the GetUILErrorString( ) should not be used to get Utility Library errors, but this function takes int for parameter and returns string. Considering the string that was returned, the integer (parameter/error ) pasted to it had to be -43. LaunchExecutableEx returns 0 through -22. I am wondering how did GetUILErrorString( ) return string that corresponds to -43 when LaunchExecutableEx ( ) cannot return such a a value.




0 Kudos
Message 8 of 14

Can you positively confirm the return value of -43 from LaunchExecutableEx ()? I mean, can your 'status' variable be manipulated somewhere in the program so that when you issue the popup message its value is changed? Can you place a breakpoint immediately after LaunchExecutableEx and verify its return value? Alternatively, can you pass the return code to DebugPrintf immediately after command execution and verify its value compared to the error message shown?

Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
If I have helped you, why not giving me a kudos?
0 Kudos
Message 9 of 14

The status variable is local to the function and is not set to anywhere else except on that line. If I had Lap Top that had these problems I'd already do that, unfortunately the only Lap Top currently experiencing these problems is out of the country :(. So for now all I can do is brainstorm and ask others for some suggestions.

0 Kudos
Message 10 of 14