Bat file to run a .exe at the command prompt
To start a program and then close command prompt without waiting for program to exit:
start /d "path" file.exe
Read more… Read less…
You can use:
start "windowTitle" fullPath/file.exe
Note: the first set of quotes must be there but you don't have to put anything in them, e.g.:
start "" fullPath/file.exe
it is very simple code for executing notepad bellow code type into a notepad and save to extension .bat Exapmle:notepad.bat
start "c:\windows\system32" notepad.exe
(above code "c:\windows\system32" is path where you kept your .exe program and notepad.exe is your .exe program file file)
Just put that line in the bat file...
Alternatively you can even make a shortcut for svcutil.exe, then add the arguments in the 'target' window.
A bat file has no structure...it is how you would type it on the command line. So just open your favourite editor..copy the line of code you want to run..and save the file as whatever.bat or whatever.cmd
Just stick in a file and call it "ServiceModelSamples.bat" or something.
You could add "@echo off" as line one, so the command doesn't get printed to the screen:
@echo off svcutil.exe /language:cs /out:generatedProxy.cs /config:app.config http://localhost:8000/ServiceModelSamples/service