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

Author Topic: How to run a program using a batch file?  (Read 2199 times)

0 Members and 1 Guest are viewing this topic.

hrn

  • Guest
How to run a program using a batch file?
« on: June 22, 2006, 02:11:46 AM »
Hello,

This is my first post.

When I try the following it doesn't work:  :-?


@echo off

cd C:\Program Files\Internet Explorer\iexplore.exe

pause

Please help.

Thank you ;)

panboy



    Adviser

  • Its all just a twisted game of cat and mouse
  • Thanked: 4
    Re: How to run a program using a batch file?
    « Reply #1 on: June 22, 2006, 02:29:19 AM »
    I dont think you Need The "Cd" a the bigining of the line.

    CD is Change Directory, what you have writen would try to find a folder in ProgramFiles Called Iexplorer.exe
    Wields The Mighty Hammer of Computer Justice

    Blank2

    • Guest
    Re: How to run a program using a batch file?
    « Reply #2 on: June 22, 2006, 06:10:27 AM »
    Quote
    @echo off
     
    start C:\Progra~1\Intern~1\iexplore.exe

    that will work. lol took me a couple of wrong times. There is away to find out where you have to put the ~1. start with start C:\progra~1\internet explore  then take explore away and put ~1 at end of  so its C:\progra~1\internet~1 and it will give you error message saying cant read then take away the t then e then n and so on till its right. So i tried that and here is your final answer.

    Glad i could help someone :)

    one step further if you want to go to www.computerhope.com once iexplore is open try this

    Quote
    @echo off
     
    start C:\Progra~1\Intern~1\iexplore.exe www.computerhope.com
    « Last Edit: June 22, 2006, 06:14:15 AM by Blank2 »

    hrn

    • Guest
    Re: How to run a program using a batch file?
    « Reply #3 on: June 22, 2006, 10:49:45 AM »

    Thank you very much.

    Helped alot.  ;D

    GuruGary



      Adviser
      Re: How to run a program using a batch file?
      « Reply #4 on: June 22, 2006, 10:50:36 AM »
      Or surround in quotes, like:
      "C:\Program Files\Internet Explorer\iexplore.exe"
      or
      start "C:\Program Files\Internet Explorer\iexplore.exe"