to launch browser with given file - Programmer

This is a discussion on to launch browser with given file - Programmer ; I want to launch the default browser with a given html file from a C program. I can do it using WinExec() by specifying Internet explorer and giving the full path to the exe. However I do not want to ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: to launch browser with given file

  1. to launch browser with given file

    I want to launch the default browser with a given html file from a C
    program. I can do it using WinExec() by specifying Internet explorer
    and giving the full path to the exe. However I do not want to assume
    IE nor where it is stored. Windows is associating .htm files with the
    application so it is possible - but how? TIA

  2. Re: to launch browser with given file

    In news:efdeca4d.0312011044.3e6b7398@posting.google.c om, Walter Milner
    typed:

    > I want to launch the default browser with a given html file from a C
    > program. I can do it using WinExec() by specifying Internet explorer
    > and giving the full path to the exe. However I do not want to assume
    > IE nor where it is stored. Windows is associating .htm files with the
    > application so it is possible - but how? TIA


    ShellExecute()

    --
    www.zenobits.com


  3. Re: to launch browser with given file

    KLinZ wrote:
    > In news:efdeca4d.0312011044.3e6b7398@posting.google.c om, Walter Milner
    > typed:
    >
    >
    >>I want to launch the default browser with a given html file from a C
    >>program. I can do it using WinExec() by specifying Internet explorer
    >>and giving the full path to the exe. However I do not want to assume
    >>IE nor where it is stored. Windows is associating .htm files with the
    >>application so it is possible - but how? TIA

    >
    >
    > ShellExecute()
    >


    Ah, I have also a nice problem concerning this.
    I want open an url, could be an image / pdf or anything else. The system
    should choose the proper application. Now ShellExecute seems to be fine,
    but I have an ActiveX, this ActiveX has a button, that one opens the
    above url.
    I can't use this ShellExecute() command, so far I understand, it sends a
    message to all existing explorers first. The ActiveX kills itself,
    because the browser, containing the ActiveX responds to this message.
    Any hints?
    Now, I don't want to change the registry for that.

    --
    Andre'


  4. Re: to launch browser with given file

    Thanks Klinz.

    I spend most of my time searching the Windows API doc for info like this.

+ Reply to Thread