Jump to content

Slow launch app by using ShelExecute


 Share

Recommended Posts

Hi,

I am launching the default browser (IE) by using ShellExecute

and its take too long time, somtimes up to 30 seconds.

If I am using the explorer manually then there is no problem.

I noticed that after upgrading to beta 3.3.1.5. but not sure that its the use case.

Does anyone has a clue what to look for?

Func _LaunchBrowser($URL)
    ShellExecute($URL)
EndFunc
Edited by lsakizada

Be Green Now or Never (BGNN)!

Link to comment
Share on other sites

HI, I still have the problem and I realy need help on that.

I have tested it on several machines against different browsers (IE & FF) and it has the same problem.

So it is not the fault of my machine as I mentioned in my first post.

I susspects that something is wrong with ShelExecute and ShellExecuteWait.

Sometimes its launched properly and sometimes not, its stock for almost 30 seconds.

here is my simple code. Whats wrong?

Warning! its will open 50 sessions of your browser

#include <Debug.au3>
Global $Debug = 1
$URL = "http://www.bing.com/search?q=Table&form=QBLH&filt=all"

For $s = 1 To 50
    _LaunchBrowser($URL)
    ConsoleWrite("Executed=" & $s & @CRLF)
    Sleep(100)
Next

Func _LaunchBrowser($URL)
        If $Debug Then
        _DebugReport("Before ShellExecute #" & " -", True)
    EndIf
    ShellExecuteWait($URL)
    
If $Debug Then
        _DebugReport("After ShellExecute #" & " -", True)
    EndIf
    ;ShellExecuteWait ($URL)
EndFunc   ;==>_LaunchBrowser

EDIT:

I input debug before and after the code and found this error message

Before ShellExecute # - : The operation completed successfully.
After ShellExecute # - : The handle is invalid.

What's the meaning of the message the handle is invalid.

How do I correct this issue?

Thanks for advanced.

Edited by lsakizada

Be Green Now or Never (BGNN)!

Link to comment
Share on other sites

I think that it is a bug of ShellExecute.

Can anyone confirm please?

The ShelExecute should parse the full URL without any problem.

So the message that was caugth by the debuger is improper

"The handle is invalid"

See this post of microsoft.

Edited by lsakizada

Be Green Now or Never (BGNN)!

Link to comment
Share on other sites

I think that it is a bug of ShellExecute.

Can anyone confirm please?

The ShelExecute should parse the full URL without any problem.

So the message that was caugth by the debuger is improper

See this post of microsoft.

I just want to update this thread and close it.

THERE IS NO BUG WITH SHELLEXECUTE.

I found that one of the other proceseses from my project suite is causing

the delay when calling ShellExecute, although there is no physics connection between them the problem occurs.

Thanks and sorry for the noise...:)

Be Green Now or Never (BGNN)!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...