Bat file to run a .exe at the command prompt

后端 未结 11 1632
萌比男神i
萌比男神i 2020-12-04 08:09

I want to create a .bat file so I can just click on it so it can run:

svcutil.exe /language:cs /out:generatedProxy.cs /config:app.config http://localhost:800         


        
11条回答
  •  盖世英雄少女心
    2020-12-04 08:38

    As described here, about the Start command, the following would start your application with the parameters you've specified:

    start "svcutil" "svcutil.exe" "language:cs" "out:generatedProxy.cs" "config:app.config" "http://localhost:8000/ServiceModelSamples/service"
    
    • "svcutil", after the start command, is the name given to the CMD window upon running the application specified. This is a required parameter of the start command.

    • "svcutil.exe" is the absolute or relative path to the application you want to run. Using quotation marks allows you to have spaces in the path.

    • After the application to start has been specified, all the following parameters are interpreted as arguments sent to the application.

提交回复
热议问题