App doesnt open through a batch file


  1. Posts : 5
    win10 home 64bit
       #1

    App doesnt open through a batch file


    Chaps...


    I have a desktop running with a few apps 24/7 feeding to a network, on the rare occasion it drops or restarts due to some update or power outage I thought I could write a simple batchfile just to restart everything automatically.

    Problem is 1 app refuses to start, the app itself is in c:\program files (x86)\ and that seems to be the issue. Error message I get is "cannot find c:\program"

    path for the app is...

    C:\Program Files (x86)\COAA\PlanePlotter\PlanePlotter.exe

    the other 2 apps open fine (but they are not pathed to (x86). am I going daft or missed something simple?

    any help welcome....
    (Win 10 64 bit all updted)

    tyvm...
      My Computer


  2. Posts : 4,131
    Windows 3.1 to Windows 11
       #2

    you have to put quote " " around the path cmd in your .bat fie..

    "C:\Program Files (x86)\COAA\PlanePlotter\PlanePlotter.exe"

    you can not have spaces in cmd wording without using quotes ( the path halts at the first space ) thus ( C:\Program )
      My Computer


  3. Posts : 3,453
       #3

    Kyhi is 100% correct.

    ...but why not use Powershell... it's more dynamic - eg: env:ProgramFiles(x86) + whatever path...
      My Computer


  4. Posts : 5
    win10 home 64bit
    Thread Starter
       #4

    tyvm chaps i'll give it a go
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 03:17.
Find Us




Windows 10 Forums