1.

Solve : Issues with start command?

Answer»

Im creating a VB program and in that program I create a batch file that...
Code: [Select]ECHO off
:loop
echo. C:\Program Files\PeaZip\peazip.exe started at %time% >>server.log
start /wait C:\Program Files\PeaZip\peazip.exe
echo. C:\Program Files\PeaZip\peazip.exe crashed at %time% >>server.log
goto loop
Just using peazip as an example. But basically I want the SCRIPT to start a server and if it crashes restart it.

Well when I run that script I get the following:


Windows cannot find 'C:\program'. Make sure you typed the name correctly and try again.

Whats happening here?Sorry, I can't see that image (Netfilter... ), can you just write it out?

Pre-post Edit: I see the PROBLEM just looking at the code. Paths with spaces need to be enclosed with quotes. So your path WOULD be:
"C:\Program Files\PeaZip\peazip.exe"
Understand?I understand, and I have tried that. However when I put it in quotes it just starts a new DOS with the TITLE "C:\Program Files\PeaZip\peazip.exe"OK ignore this post. Quotes put it on the title yes, but if i do:

start /wait "" "C:\Blah Blah\Blah.exe" it works. I just needed a double set of quotes. THanks!



Discussion

No Comment Found