How to execute batch files in command prompt




















Viewed k times. Improve this question. Guy Avraham 3, 2 2 gold badges 35 35 silver badges 46 46 bronze badges. Add a comment. Active Oldest Votes. Improve this answer. Blorgbeard Blorgbeard Oh, I think I know what's happening - see my edit, I added "start" before the iisexpress line. In both cases, I execute it as admin. Tell me please, what I do wrong?

Show 1 more comment. Thanks a lot :- — Pushpendra. Community Bot 1 1 1 silver badge. Feety Feety 1 1 gold badge 5 5 silver badges 11 11 bronze badges. Peter O. Ethan Ethan 91 1 1 silver badge 1 1 bronze badge. Technically correct.. I've been looking for this, so I'm glad you posted this even though its not what the OP wanted : — dandeto.

VictorLee VictorLee 1, 2 2 gold badges 9 9 silver badges 26 26 bronze badges. Learn more. Bat script read output of command prompt Ask Question. Asked 2 days ago. Active 2 days ago. Viewed 56 times. I have this sample code: Edit: the section "" isjust an example of what I am trying to achieve.

Improve this question. Andreasx23 Andreasx23 9 4 4 bronze badges. I do not understand what line you mean by line. Yes, but where is the line stored, or where does it come from? Eventually the game will finish and it will print inside the CMD the line I decribed before — Andreasx We know absolutely noting about the inner workings of your game, what method it uses to output to the console, or in fact the method it uses to report the end result.

It is unlikely that the case insensitive string the game , which is the only common string between your two examples, or win or draw , will never be used elsewhere during the executables run time, so it is probably not a robust string to check for. Essentially we would need far more information that you have submitted, in order to consider trying to assist you with a code task you have not yet attempted to solve yourself.

Show 5 more comments. Active Oldest Votes. Improve this answer. Grimthorr 6, 5 5 gold badges 40 40 silver badges 52 52 bronze badges. Erik Philips Daniel Daniel 7 7 silver badges 16 16 bronze badges.

Now it prints the quotes with the text, but there is no more strange behavior. It's useful to use the quotes and include a space at the end as it makes the prompt on the command line nicer.

Having the quotes makes it obvious that there is a space there in the batch file. Eamorr 9, 32 32 gold badges silver badges bronze badges. This works for me in Windows 8. Edited to format code paragraphs properly. Timothy J. McGowan Timothy J. McGowan 1 1 silver badge 7 7 bronze badges. Carl H 1 1 silver badge 12 12 bronze badges. Anisha Gupta Anisha Gupta 81 1 1 silver badge 1 1 bronze badge.

Why do you start with :start? For example, he might use a :end as well, that causes things like variable cleanup to happen, or to call a popd , or something like that. There are two possibilities. ECHO "remember to run this as admin. Werdna Werdna 51 1 1 silver badge 1 1 bronze badge.

Hi again this usefull script is used on Win10 pc after initial setup :- — Werdna. This will assign the input to the value jstackId: call userInput. Excellent solution. Thank you! ElektroStudios John John 21 1 1 bronze badge. Antoni Antoni 2 2 silver badges 7 7 bronze badges. Stephan, The second part of your proposal does not preserve the values between runs!? Can you develop it more?

It just gives a default value. Its kind of more flexible You can send the data the same way with powershell. So in your cmd, write this considering the ps script is in C: : PowerShell. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked See more linked questions.



0コメント