Bat file to run a .exe at the command prompt

后端 未结 11 1537
萌比男神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:43

    If your folders are set to "hide file extensions", you'll name the file *.bat or *.cmd and it will still be a text file (hidden .txt extension). Be sure you can properly name a file!

    0 讨论(0)
  • 2020-12-04 08:48

    To start a program and then close command prompt without waiting for program to exit:

    start /d "path" file.exe
    
    0 讨论(0)
  • 2020-12-04 08:48

    If you want to be real smart, at the command line type:

    echo svcutil.exe /language:cs /out:generatedProxy.cs /config:app.config http://localhost:8000/ServiceModelSamples/service >CreateService.cmd
    

    Then you have CreateService.cmd that you can run whenever you want (.cmd is just another extension for .bat files)

    0 讨论(0)
  • 2020-12-04 08:52

    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)

    enjoy!

    0 讨论(0)
  • 2020-12-04 08:54

    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
    
    0 讨论(0)
提交回复
热议问题