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

Author Topic: Issues with start command  (Read 2273 times)

0 Members and 1 Guest are viewing this topic.

ak.h

    Topic Starter


    Starter

    Issues with start command
    « on: February 19, 2010, 09:19:57 AM »
    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?
    « Last Edit: February 19, 2010, 09:34:48 AM by ak.h »

    Helpmeh



      Guru

    • Roar.
    • Thanked: 123
      • Yes
      • Yes
    • Computer: Specs
    • Experience: Familiar
    • OS: Windows 8
    Re: Issues with start command
    « Reply #1 on: February 19, 2010, 09:31:27 AM »
    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?
    Where's MagicSpeed?
    Quote from: 'matt'
    He's playing a game called IRL. Great graphics, *censored* gameplay.

    ak.h

      Topic Starter


      Starter

      Re: Issues with start command
      « Reply #2 on: February 19, 2010, 09:33:05 AM »
      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"

      ak.h

        Topic Starter


        Starter

        Re: Issues with start command
        « Reply #3 on: February 19, 2010, 09:44:38 AM »
        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!