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

Author Topic: Batch File: One Prog won't run (start /d), but all others do.  (Read 3978 times)

0 Members and 1 Guest are viewing this topic.

AaronStarr

    Topic Starter


    Rookie

    I have a Start Up .bat file I wrote.

    Example:

    start /d "C:\Windows\System32" notepad.exe
    start /d "C:\Program Files\WordWeb 6" wweb32.exe
    start /d "C:\Program Files\Convert" Convert.exe

    The first two programs start fine, but the third program (convert.exe) will never start from the batch file (It starts fine, normally).

    Any thoughts?

    Sidewinder



      Guru

      Thanked: 139
    • Experience: Familiar
    • OS: Windows 10
    Re: Batch File: One Prog won't run (start /d), but all others do.
    « Reply #1 on: June 17, 2010, 04:30:28 PM »
    The first two programs start fine, but the third program (convert.exe) will never start from the batch file (It starts fine, normally).

    How do you know it never starts from the batch file? Does it throw an error? Does convert.exe run in Windows or the CMD shell? Does convert.exe create a log file you can check for more information? What do you mean by it "starts fine normally"?  Define normal.

    Need more information, but it does seem curious. 8)
    The true sign of intelligence is not knowledge but imagination.

    -- Albert Einstein

    AaronStarr

      Topic Starter


      Rookie

      Re: Batch File: One Prog won't run (start /d), but all others do.
      « Reply #2 on: June 19, 2010, 01:24:48 AM »
      By *normally*, I mean that it runs fine if I run it from, say, the Start Menu shortcut link (or by double clicking it from its .exe). So I know it works. I just can't get it to run/start from a .bat file for some reason. It doesn't even show up in Windows Task Manager Processes as running hidden (when run from a .bat).

      Does that clarify better?  ;)

      Thanks.

      Salmon Trout

      • Guest
      Re: Batch File: One Prog won't run (start /d), but all others do.
      « Reply #3 on: June 19, 2010, 03:00:07 AM »
      Are you sure that convert.exe is actually in that folder (C:\Program Files\Convert) and not some sub folder?

      Why are you using the /d switch? Is there some special reason you can't do this?

      Code: [Select]
      start "C:\Program Files\Convert\Convert.exe"

      AaronStarr

        Topic Starter


        Rookie

        Re: Batch File: One Prog won't run (start /d), but all others do.
        « Reply #4 on: June 19, 2010, 03:31:39 AM »
        Yes. Convert.exe is located in the right place (C:\Program Files\Convert\Convert.exe).

        I learned to use the /d switch For when you start a program (I don't even know what it does exactly). Is it not necessary?

        I figured out another way to make it work, though... Using a vbs script.

        [[ The *special reason* to do it?... Yes, I could manually start it myself. But I wanted to start several programs together with the click of one mouse button. Programs that I use for work... to start up my 'work environment'. ]]

        Thanks for your help.

        Salmon Trout

        • Guest
        Re: Batch File: One Prog won't run (start /d), but all others do.
        « Reply #5 on: June 19, 2010, 03:40:16 AM »
        You misunderstood my question. Why don't you start convert.exe from a batch file (not "manually") with a line like this...

        Code: [Select]
        start "C:\Program Files\Convert\Convert.exe"
        That is, start followed by a space then the program drive letter, path, and filename (all in quotes because of the space in 'Program Files')

        Have you tried this?

        The /d switch changes to the directory that is named; you would do this if you wanted to actually be in that directory for some reason. If you did not need that specifically, you would use the form that I described above.



        AaronStarr

          Topic Starter


          Rookie

          Re: Batch File: One Prog won't run (start /d), but all others do.
          « Reply #6 on: June 19, 2010, 04:33:44 AM »
          Ok... gotcha.

          And thanks, also, for correcting me about the /d switch. Don't need it now, but might in the future (now that I know what it's for).  ;)