Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 712 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bat file to run a .exe at the command prompt

#1
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

[To see links please register here]



Can someone help me with the structure of the .bat file?
Reply

#2
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.
Reply

#3
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
Reply

#4
What's stopping you?

Put this command in a text file, save it with the .bat (or .cmd) extension and double click on it...

Presuming the command executes on your system, I think that's it.
Reply

#5
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

[To see links please register here]

Reply

#6
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!
Reply

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

start /d "path" file.exe
Reply

#8
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!

Reply

#9
Well, the important point it seems here is that svcutil is not available by default from command line, you can run it from the vs xommand line shortcut but if you make a batch file normally that wont help unless you run the vcvarsall.bat file before the script.
Below is a sample

<pre>
"C:\Program Files\Microsoft Visual Studio *version*\VC\vcvarsall.bat"
svcutil.exe /language:cs /out:generatedProxy.cs /config:app.config

[To see links please register here]

</pre>
Reply

#10
As described [here][1], 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.

[1]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through