2 Replies Latest reply: Nov 16, 2012 12:55 PM by sharpe RSS

    WebUtil Client Host Question

    sharpe
      Hi. I have a WebUtil enabled form where I use the client_host built-in. Client_host built-in is working as I've verified the following command executes just fine:
      client_host('c:\ttmsapps\compiled\Menuupdate.exe');
      However, when I try to point it to an .htm file on my Windows pc, expecting the .htm file to open and be viewable, it does not work. There is no error either at compile time or at runtime - it's just that the document does not open. Here's the statement that appears to do nothing:
      client_host('c:\TOC.htm');
      Any help on why this isn't working would be greatly appreciated. Thanks.
        • 1. Re: WebUtil Client Host Question
          sharpe
          Got it working by modifying the command as follows:
          client_host('iexplore.exe c:\TOC.htm');
          • 2. Re: WebUtil Client Host Question
            Michael Ferrante-Oracle
            You cannot just pass an html file to the command line from a form and expect it to launch a browser. Either of the following should work, but keep in mind there are many additional ways to accomplish this.

            OPTION 1:
            This method is intended to handle web content and URLs. This is not the best choice for other content types.
            client_host('rundll32 url.dll,FileProtocolHandler "c:\TOC.htm"');
            OPTION 2:
            This option is probably the better of the two because it will properly handle any document file extention. In other words, if you try to open a .doc file and MS Word is installed, it will automatically open it. If a .txt file is entered, it will automatically choose Notepad.... and so on.
            client_host('rundll32 shell32,ShellExec_RunDLL "c:\TOC.htm"');