0

I have created a executable file lets say 'Startbackup.exe' and it is located in 'D:\Start Backup\Startbackup.exe'

What i am trying to acheive is to create a bactch file to start this .Exe uisng defualt paramter . My parameter is 'Startbackup/run'.

I tried following command in cmd and it works.

enter image description here

How can i create a .bat file? I have tried following but its not working

Start /D D:\Start Backup\ Startbackup Parameter Startbackup/run
Tarun. P
  • 422
  • 7
  • 16
  • This may help: https://stackoverflow.com/questions/72671/how-to-create-batch-file-in-windows-using-start-with-a-path-and-command-with-s – Ruud Helderman Jun 29 '18 at 13:44
  • @RuudHelderman thanks for the link it helps – Tarun. P Jun 29 '18 at 13:57
  • Your 'starting directory path' has spaces so should be doublequoted, `Start /D "D:\Start Backup"`. If `startbackup/run` works then it appears that `/run` is your parameter, so all you need is to append that, with an optional/empty title, e.g `Start /D "D:\Start Backup" startbackup /run` or `Start /D "D:\Start Backup" "" startbackup /run`. – Compo Jun 29 '18 at 14:55

2 Answers2

1

That is because the first parameter of start is the name, and the second one is the path to the executable.

Try this:

Start "" "D:\Start Backup\StartBackup.exe"
J. Doe
  • 43
  • 5
0

I got it working now.

start "" "D:\Start Backup\StartBackup.exe" parameter StartBackup/Start

I dont have any space in my arguments so this solution works.

Tarun. P
  • 422
  • 7
  • 16