Search code examples
batch-filecommand-promptnotepad

When using Batch file to start a program, it says "Cannot find 'example.exe' "


I am 100% sure that I have the exe application. The exe application is DriverBooster.exe. It will not start the program with the command `

@echo off
start DriverBooster.exe

`. I searched my computer and found the exact file in C:\Program Files\IObit\Driver Booster, with the exe so then I wrote

@echo off
start C:\Program Files\IObit\Driver Booster\DriverBooster.exe

` But it still shows that Windows cannot find the program "DriverBooster.exe", try fixing spelling mistakes. I also checked the spelling and its 100% correct. I am using a batch file and editing it with "notepad" (Yes a regular notepad). Please someone help.I would greatly appricate anyone helping, thank you! This is the application


Solution

  • It might be due to the space in the file location, try this:

    @echo off
    start "" "C:\Program Files\IObit\Driver Booster\DriverBooster.exe"
    

    EDIT: Added extra set of quotes as suggested by Squashman - it has been a while since I've done bash :)