Strange delay opening web page from command prompt

User Help for Seamonkey and Mozilla Suite
Post Reply
User avatar
Ztruker
Posts: 1309
Joined: February 27th, 2005, 1:08 pm
Location: Melbourne, Fl

Strange delay opening web page from command prompt

Post by Ztruker »

If I open a web page from a Command Prompt and Seamonkey is my default web browser as follows:

Create a small batch file with these lines in it:

CHOICE /C "VC" /M "Your choice?:" >nul 2>&1
If %errorlevel%==1 (Start "" "https://www.google.com")
Exit


Open a Command Prompt and run the batch file.
Press the V key which will take your web browser to the above web page and should immediately close the Command Prompt window. If Seamonkey is my default browser, there is a 10 second delay before the Command Prompt window closes. If Edge is the default it closes immediately.

I'm going to try and test this in Seamonkey Safe Mode and see what happens.

Edit: Same in Seamonkey Safe mode.
Rich
Do, or do not. There is no try. - Yoda
User avatar
therube
Posts: 21714
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: Strange delay opening web page from command prompt

Post by therube »

I would think that the Start should be firing asynchronously in which case the Exit should happen, immediately.
Windows 10, huh.

XP here, no issue (different batch file):

Code: Select all

start  ""  www.google.com
exit
(Oh, & I ran it with SeaMonkey already open, so all it had to do was open a [[google] tab] in the existing session.)
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
User avatar
Ztruker
Posts: 1309
Joined: February 27th, 2005, 1:08 pm
Location: Melbourne, Fl

Re: Strange delay opening web page from command prompt

Post by Ztruker »

That little batch file shows the same delay on my Win 10 system, about 10 seconds between opening Google an exiting the Command Prompt window.

I'm going to try it in Windows 10 Safe Mode and see what happens.

Same in Safe Mode and in Clean Boot mode.

Ran Seamonkey in Safe Mode and it made no difference, still a 10 second delay.

Tried a different user account, same problem.

Same problem on my Laptop running the same Win 10 build 2004 19041.508.
Rich
Do, or do not. There is no try. - Yoda
hardys
Posts: 290
Joined: August 7th, 2015, 9:15 am

Re: Strange delay opening web page from command prompt

Post by hardys »

No problem here with Win10 pro 64bit and SM as default browser in a command prompt

Code: Select all

start www.google.com
SM opens instantly and displays the page without delay :?
User avatar
therube
Posts: 21714
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: Strange delay opening web page from command prompt

Post by therube »

in a command prompt
Not from a command prompt, but from a batch file.
And the batch file (window) should be closing immediately.


(The start should open google.com, in your default browser (in your default handler) - asynchronously, with the exit exiting (closing the batch file windows), immediately.

Or if FF is not your default, you can still test it (or any other browser, program...) with something like:

go.bat:

Code: Select all

start   ""   C:\FF-NIGHTLY\firefox.exe   -profile FF-NIGHTLY-PROFILE   www.google.com
exit
)
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
User avatar
therube
Posts: 21714
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: Strange delay opening web page from command prompt

Post by therube »

Son of a gun! How do you like that!
Now, why does that happen?

It's the http[s] that causes it (in Win10 - not in XP, not in Win7).
Why?
Now, I'm confused?
(With your code) might I have forgotten to hit V or C?
Cause I just went to look again, & now I'm not seeing the delay?

(And I'm thinking your batch file, while it may work, isn't quite "right".
Thinking you might want something more like:

Code: Select all

@ECHO OFF
CHOICE /C "VC" /M "Your choice:  "
If %errorlevel%==1 (START  ""  https://www.google.com)
Exit
)
(And, to top it off, all this time, I was thinking I was in the FF forums #-o.)
(I can't believe that CHOICE does not respect the space after the colon.
Maybe if the /C choices were hidden, but I didn't check that?)
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
User avatar
Ztruker
Posts: 1309
Joined: February 27th, 2005, 1:08 pm
Location: Melbourne, Fl

Re: Strange delay opening web page from command prompt

Post by Ztruker »

I fail with the simple two line batch file you posted. CHOICE doesn't even enter into it.

Code: Select all

start  ""  www.google.com
exit
no https involved.
Rich
Do, or do not. There is no try. - Yoda
hardys
Posts: 290
Joined: August 7th, 2015, 9:15 am

Re: Strange delay opening web page from command prompt

Post by hardys »

Have you set SM as your default browser in WIN 10?
go.bat with this content opens SM and displays the site without delay:

Code: Select all

start www.google.com
exit
User avatar
Ztruker
Posts: 1309
Joined: February 27th, 2005, 1:08 pm
Location: Melbourne, Fl

Re: Strange delay opening web page from command prompt

Post by Ztruker »

Rich
Do, or do not. There is no try. - Yoda
hardys
Posts: 290
Joined: August 7th, 2015, 9:15 am

Re: Strange delay opening web page from command prompt

Post by hardys »

Does the delay also happen when you open the run dialog in the start menu and type in www.google.com and press enter?
User avatar
Ztruker
Posts: 1309
Joined: February 27th, 2005, 1:08 pm
Location: Melbourne, Fl

Re: Strange delay opening web page from command prompt

Post by Ztruker »

No but I wouldn't expect it to since there is no Command Prompt involved.
Rich
Do, or do not. There is no try. - Yoda
User avatar
therube
Posts: 21714
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Re: Strange delay opening web page from command prompt

Post by therube »

If Seamonkey is my default browser, there is a 10 second delay before the Command Prompt window closes. If Edge is the default it closes immediately.
If SeaMonkey is not your default browser, do you still have the delay?
(You'd likely need to change your batch file to point to where SeaMonkey is installed, is (seamonkey.exe).
Eg., c:/program files/seamonkey/seamonkey.exe ...)
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript
User avatar
Ztruker
Posts: 1309
Joined: February 27th, 2005, 1:08 pm
Location: Melbourne, Fl

Re: Strange delay opening web page from command prompt

Post by Ztruker »

The delay was there, I tried it first. I set Edge as my default and ran the test batch file and it opened Google in Edge and closed the Command Prompt window instantly, no delay.

Now I'm totally confused. Set it back to Seamonkey being the default Web Browser and ran the test batch file and it still works as if Edge is the default. Google opens and the Command Prompt closes immediately.

The delay is gone.

Verified Seamonkey is the default Web Browser.
Rich
Do, or do not. There is no try. - Yoda
Post Reply