in reply to How do I launch my browser in Win32 to go to a specified URL?
The following is a modified version of a Java function I borrowed from one of the Javaworld tips to fire up the default browser at a particular URL in Windows:
$url = ...; $cmd = "rundll32 url.dll,FileProtocolHandler $url"; unless ( fork ) { exec $cmd; }I'm not on a Windows box now, so I don't know the ramifications of using Perl's fork() under Win32, and I haven't tested this code. Of course, there should be a bit of error checking here and there, but you get the general idea. The tech tips can be found off Javaworld at http://www.javaworld.com/ - just search for 'browser' on the tips page (they also have code for kicking off a browser in Unix).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: rundll32 is the right answer!
by rduke15 (Beadle) on Apr 10, 2005 at 16:47 UTC | |
RE: Re:
by Anonymous Monk on Apr 30, 2000 at 16:26 UTC |