1.

Solve : Batch File: One Prog won't run (start /d), but all others do.?

Answer»

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?Quote from: AaronStarr on June 16, 2010, 11:45: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. 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.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"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.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.


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).


Discussion

No Comment Found