Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: how can I open a URL file (Internet Shortcut) using iexplore.exe and a parameter  (Read 10588 times)

0 Members and 1 Guest are viewing this topic.

s_r

    Topic Starter


    Newbie

    • Experience: Beginner
    • OS: Unknown
    If I try giving the file's name as a parameter, internet explorer uses the file-name as url, instead of the url itself.
    Double-clicking the URL file or dragging it to an existing window works, but I need to do it from a program, without using the cmd (or the start cmd)

    Thanks

    soybean



      Genius
    • The first soybean ever to learn the computer.
    • Thanked: 469
    • Computer: Specs
    • Experience: Experienced
    • OS: Windows 10
    I can't make any sense of your post.  Internet explorer is a web browser; you use it to view websites.  You know that, right?  ::)  It is not a program used to open "files" on your computer.  So, your comments about " giving the file's name as a parameter" make no sense whatsoever in relation to using a web browser.

    Salmon Trout

    • Guest
    I need to do it from a program, without using the cmd (or the start cmd)

    Why?


    Salmon Trout

    • Guest
    I can't make any sense of your post.  Internet explorer is a web browser; you use it to view websites.  You know that, right?  ::)  It is not a program used to open "files" on your computer.  So, your comments about " giving the file's name as a parameter" make no sense whatsoever in relation to using a web browser.

    He's asking about internet shortcuts; these are text files that follow the standard .ini file format. They have the extension .url Here are a couple of examples

    Code: [Select]
    [InternetShortcut]
    URL=http://mpc-hc.sourceforge.net/

    Code: [Select]
    [{000214A0-0000-0000-C000-000000000046}]
    Prop3=19,2
    [InternetShortcut]
    URL=http://go.microsoft.com/fwlink/?LinkId=54729
    IDList=

    It's simple enough to parse out the line that starts URL= but I want to know why the OP is specifying this

    Code: [Select]
    I need to do it from a program, without using the cmd (or the start cmd)



    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    couldn't one use the start command to do this as well by invoking the default verb on the url file?
    I was trying to dereference Null Pointers before it was cool.

    Salmon Trout

    • Guest
    couldn't one use the start command to do this as well by invoking the default verb on the url file?

    That would invoke the default browser; he says in his subject line he wants to run iexplore.exe, (why?) and he says he wants to do it "from a program" (why?)...

    Quote
    without using the cmd (or the start cmd)

    s_r

      Topic Starter


      Newbie

      • Experience: Beginner
      • OS: Unknown
      Hi,

      First of all, it's a she.
      And to answer your questions:
      Not using the cmd is part of the requirements, and the reasons are complicated, so I'll leave it for now.
      That would invoke the default browser; he says in his subject line he wants to run iexplore.exe, (why?) and he says he wants to do it "from a program" (why?)...

      I need to do it automatically in a special case, and writing a batch file or a python script to do it will force me changing the design.

      In the meantime  I found out that giving the url file with full path works just fine - if I give only the filename, it treats it as a url.

      Thanks

      Raptor

      • Guest
      So you want to open a webpage from a command line?

      firefox.exe -new-tab computerhope.com

      Works for me. Just point it to the Firefox directory first.