From: JHJL on
Hi all

I use the following code from the wiki to launch the default web
browser on Windows XP

catch {eval exec [auto_execok start] [list $url] &} err

and this works fine when my code is executed from the command line e.g
tclsh85 myprog.tcl.

However when I wrap the application into a .exe using TclApp (from
tclDevKit) all I get is a Windows command window the browser isn't
launched. The same problem occurs if I create a .kit instead of
the .exe.

The url being launched is a file on the disk external to the VFS in
the kit.

As ever all help gratefully recieved

kind regards
Julian H J Loaring
From: Don Porter on
JHJL wrote:
> catch {eval exec [auto_execok start] [list $url] &} err
....
> However when I wrap the application into a .exe using TclApp (from
> tclDevKit) all I get is a Windows command window the browser isn't
> launched. The same problem occurs if I create a .kit instead of
> the .exe.

Does [auto_execok start] return the same thing?

--
| Don Porter Mathematical and Computational Sciences Division |
| donald.porter(a)nist.gov Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|______________________________________________________________________|
From: JHJL on
On Jun 24, 3:15 pm, Don Porter <d...(a)nist.gov> wrote:
> JHJL wrote:
> > catch {eval exec [auto_execok start] [list $url] &} err
> ...
> > However when I wrap the application into a .exe using TclApp (from
> > tclDevKit) all I get is a Windows command window the browser isn't
> > launched. The same problem occurs if I create a .kit instead of
> > the .exe.
>
> Does [auto_execok start] return the same thing?
>
> --
> | Don Porter          Mathematical and Computational Sciences Division |
> | donald.por...(a)nist.gov             Information Technology Laboratory |
> |http://math.nist.gov/~DPorter/                                 NIST |
> |______________________________________________________________________|

In all cases (.kit, .exe & .tcl) auto_execok start returns C:/WINDOWS/
system32/cmd.exe /c start
From: Kroc on
Hi Julian,

To launch the default browser on Windows I do that:

set url [regsub -all -nocase {htm} $url {ht%6D}]
exec rundll32 url.dll,FileProtocolHandler $url &

--
David Zolli
From: Don Porter on

JHJL wrote:
>>> catch {eval exec [auto_execok start] [list $url] &} err

> In all cases (.kit, .exe & .tcl) auto_execok start returns C:/WINDOWS/
> system32/cmd.exe /c start

Ok, so then we have the refined question, "Why does [exec
C:/WINDOWS/system32/cmd.exe /c start $url &] have
different behavior in the different contexts?" Test and confirm that's
the root issue.


--
| Don Porter Mathematical and Computational Sciences Division |
| donald.porter(a)nist.gov Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|______________________________________________________________________|