in reply to Re:
in thread How do I launch my browser in Win32 to go to a specified URL?
Before finding the answer here, I had tried extracting the http handler program from the registry and calling it directly. That seemed fine until I tried to switch my default browser to Internet Explorer. The exe lives in "C:\Program Files\Internet Explorer\iexplore.exe" so exec() cannot be used because of the spaces in the path. system() worked, but the script doesn't return until the Explorer window is closed.
I have now
which works reliably.my $url = $baseurl . join("&", map {"$_=$params{$_}"} keys %params); my $cmd = qq{rundll32 url.dll,FileProtocolHandler "$url"}; exec $cmd;
The next question will be how to achieve the same thing on Mac and Linux to have a multi-platform script, but that will be in another thread.
|
|---|