Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: How to start default browser on Windows?

by Thelonius (Priest)
on Aug 11, 2005 at 14:59 UTC ( #482985=note: print w/replies, xml ) Need Help??


in reply to How to start default browser on Windows?

#!perl -w use Win32 qw(SW_SHOWNORMAL); use Win32::API; use strict; my $shellexec = Win32::API->new('shell32', 'ShellExecute', 'NPPPPI', 'N') or die "cannot import ShellExecute: $!\n"; my $result = $shellexec->Call(0, "open", "http://perlmonks.org/", "", ".", SW_SHOWNORMAL); if ($result < 33) { print STDERR Win32::FormatMessage($result), "\n"; exit(1); }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://482985]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2022-05-17 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (68 votes). Check out past polls.

    Notices?