Old 13th June 2016, 14:28   #1
butsay
Junior Member
 
Join Date: May 2016
Posts: 19
Two windows are opened with ExecShell

Hi all!
I have a very strange problem with using ExecShell.
My code is very simple:

Section

ExecShell "open" "iexplore.exe" cnn.com


SectionEnd

For some reason this command opens two windows with the same URL.
I need just one.
What I'm doing wrong?
Please advise me.
Thank you!!!
Igor.
butsay is offline   Reply With Quote
Old 13th June 2016, 16:17   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
There are a lot of problems with this code.

The correct way to open a website is: ExecShell "" "http://example.com"

You are trying to force IE, you should probably not be doing this and if you have to, at least use a full URL with a protocol prefix like "http://"!

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 13th June 2016, 17:14   #3
butsay
Junior Member
 
Join Date: May 2016
Posts: 19
Hello Anders,
Thank you for your quick respond.
Whatever I'm doing , I've got the same result:two windows opened with the same URL.
ExecShell "" "http://cnn.com" - doesn't work as well.
I need to open the URL link in IE browser when user clicks on Finish button on the finish page.
Is there any work around I can use to get this goal?
Please let me know.
Thank you so much.
Igor.
butsay is offline   Reply With Quote
Old 13th June 2016, 17:59   #4
butsay
Junior Member
 
Join Date: May 2016
Posts: 19
I've used this code example :
http://nsis.sourceforge.net/Open_URL...COM_automation
and I've got the same result with two windows opened.
But this code doesn't use ExecShell .
butsay is offline   Reply With Quote
Old 13th June 2016, 18:54   #5
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
There could be a configuration problem on your machine. Try it on another machine...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 13th June 2016, 19:14   #6
butsay
Junior Member
 
Join Date: May 2016
Posts: 19
I've got the same result on another PC.
When I execute in MS cmd : Start iexplore http://cnn.com
I have only one window opened with the URL above,
but if I execute ExexShell in the installer it opens two windows.
I've found a work around to create a bat file with the command:
Start iexplore http://cnn.com
and execute it by nsExec::Exec
butsay is offline   Reply With Quote
Old 13th June 2016, 21:32   #7
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
I have never heard of this issue before. What is your Windows version? IE version?

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump