[Win7] Help with Start command


Recommended Posts

I'm just making a wee batch file that will start a few programs for me, one being the Teamspeak program. However when I type:

start C:\Program Files\TeamSpeak 3 Client\tsclient_win64.exe

I get an error say it cannot find the path "C:\program"

What am I doing wrong? I've tried encapsulating the path with double quotes, but still no luck.

Link to comment
https://www.neowin.net/forum/topic/1085141-win7-help-with-start-command/
Share on other sites

As far as I can tell, you need to encapsulate only the parts of the file path that DO contain spaces; rather than the whole file path. Sounds silly but it seems to work from my testing. So you would re-write your batch file to be the following:

start C:\"Program Files"\"TeamSpeak 3 Client"\tsclient_win64.exe

From this website: http://www.computerh...om/starthlp.htm

"If the file or folder has a space in it you must surround it with quotes. Without the quotes surrounding the file name with a space you would get a windows cannot find the file error."

This may be of some help: http://stackoverflow...-command-with-s

Basically, you need it to say:

START "" "C:\Program Files\TeamSpeak 3 Client\tsclient_win64.exe"

To explain that...

The first "" after START is for the title of the command window. Since you don't need anything, it's not needed, so "" means nothing basically. Then you add your file path. Since it contains spaces, that also needs to be encapsulated in speech marks.

This may be of some help: http://stackoverflow...-command-with-s

Basically, you need it to say:

START "" "C:\Program Files\TeamSpeak 3 Client\tsclient_win64.exe"

To explain that...

The first "" after START is for the title of the command window. Since you don't need anything, it's not needed, so "" means nothing basically. Then you add your file path. Since it contains spaces, that also needs to be encapsulated in speech marks.

Or that...

It all comes down to CMD syntax. You could always enter the /? switch after any CMD command to review its syntax/uses first.

Thanks for the help guys, I tried both methods but neither seem to work.

However if I try another program, it will work fine. Which does have me stumped. I tried Start "" "C:\program files\ccleaner\ccleaner64.exe" will work. Odd.

If you type: "C:\Program Files\TeamSpeak 3 Client\tsclient_win64.exe" (with the quotes) in a run command, does it load?

Sadly, it doesn't load and another CMD prompt loads.

This is really strange, I might reinstall TeamSpeak and see if that fixes it.

Yes that is odd?!

I tested using an EXE in Program Files using both methods and they both worked fine.

Maybe write the batch script to change to the associated Program Files directory first and then run the file on the next line:

@echo off

cd C:\Program Files\TeamSpeak 3 Client

tsclient_win64.exe

Yes that is odd?!

I tested using an EXE in Program Files using both methods and they both worked fine.

Maybe write the batch script to change to the associated Program Files directory first and then run the file on the next line:

@echo off

cd C:\Program Files\TeamSpeak 3 Client

tsclient_win64.exe

Thats works thanks for all the help! :)

Ahh...congrats...problem solved.. :D

But, is'nt it lots easier if you just make a shorcut?

He is making a batch file to start multiple programs, so shortcuts will not be as effective...

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.