none
User writes to variable though a batch file to a environment variable RRS feed

  • Question

  • I want a user to be prompt for a string which writes to a variable within a batch file by means though a program which reads the variable though a environment variable.  I hope that was clear ?
    • Moved by Bill_Stewart Wednesday, December 12, 2018 4:48 PM Question not understandable
    Saturday, August 11, 2018 3:09 AM

All replies

  • I want to know if it's possible as I was directed here ?
    Saturday, August 11, 2018 3:51 AM
  • If what is possible?  You have posted a run-on sentence that makes no sense.

    Try thinking about what you want to ask and ask one simple question.


    \_(ツ)_/


    • Edited by jrv Saturday, August 11, 2018 4:04 AM
    Saturday, August 11, 2018 4:04 AM
  • There is no other way to explain it, but if you don't understand.
    Saturday, August 11, 2018 4:06 AM
  • If you do not know how to write a question in English then you should get someone to help.  Ask your teachers or parents to help you compose a clear question and to write a simple sentence.

    Unfortunately for you this is a forum for trained Windows technicians who use scripting professionally or who are learning scripting.  Kids do come here an ask questions but most usually are a bit older and can write a sentence.

    Of course it is possible that English is not your first language and you are just learning.  Still.  Sentences are ingle thoughts and that is true in almost all languages so you should be able to sort out how to write a simple sentence.

    Start by asking a question like "How do I do x?"  This would be a good starter.

    Think of it this way.  What item is it you want to know?  Ask about that item.

    I also recommend looking up what a batch file is. I posted a link to help get you started.  Work your way through the link pages and see if you can understand it.  It will answer most things you need to know about batch.


    \_(ツ)_/

    Saturday, August 11, 2018 4:24 AM
  • Honestly, if you did not understand my question; I can tell you, I most likely have stronger English then you. For you to assume because you did not want to understand my question that I don't know English is on you, too bad you go around assuming what you want to believe.

    Saturday, August 11, 2018 4:28 AM
  • I asked you more than once what your question was.  You first post is not a question it is just a run-on sentence.  If you can write a question please write it now.

    Do you know what a variable is?  Do you know what an environment variable is?  Have you tried to look this up?  Have you tried to look up how to write a batch file?

    YOU ramble about writing through a batch file to a variable by some user by some mechanism.

    The best I can guess is to tell you to start here:

    set /?

    Search for articles on environment variables.

    As I noted earlier, batch scripts are obsolete. If you do not know batch then don't waste time on it.

    You can also try to re-write your original run-on sentence so it makes sense.  Learning batch scripting or scripting and Windows would help yu sort out the original sentence.


    \_(ツ)_/

    Saturday, August 11, 2018 4:35 AM
  • With regards to your questions, yes; I know what is a variable, environment variable, loop etc.

    If batch scripting is dead, then what is the alternative, power shell ?

    To re-phrase the question again.  I want a user to be prompt to enter a string, which in return writes to a variable within, I'll use the word, a batch file for the sake of the question.

    Saturday, August 11, 2018 4:42 AM
  • You want a user to be "prompt"?  "Prompt" means on time.

    My best guess is that you are asking "how o I prompt a user?"

    Answer: SET /?

    read the instructions on how to prompt a user.  The correct syntax will cause the user to b prompted with a string.

    "a variable within" - what is that.  "Within" what?

    Either you do not have English as a first language or you have an issue with verbs and adverbs.  This makes understanding your request more difficult.

    "SET"  is the command you need to study.  It will explain variables and the "setting" of variables.

    In PowerShell:

    $myvar = Read-Host 'enter your name'


    \_(ツ)_/

    Saturday, August 11, 2018 4:50 AM
  • You want a user to be "prompt"?  "Prompt" means on time.

    My best guess is that you are asking "how o I prompt a user?"

    Answer: SET /?

    read the instructions on how to prompt a user.  The correct syntax will cause the user to b prompted with a string.

    "a variable within" - what is that.  "Within" what?

    Either you do not have English as a first language or you have an issue with verbs and adverbs.  This makes understanding your request more difficult.

    "SET"  is the command you need to study.  It will explain variables and the "setting" of variables.

    In PowerShell:

    $myvar = Read-Host 'enter your name'


    \_(ツ)_/

    Prompt means to cause or bring about, bring about meaning; to bring something about, in other words; ask the user to enter a string of characters.  Or, as you said to do something immediately, there are two meanings.

    You are choosing to make my question difficult, I choose to end this discussion.

    Saturday, August 11, 2018 5:13 AM
  • "I want a user to be prompt " - on time.

    Good choice.  You won't get an argument from me.


    \_(ツ)_/

    Saturday, August 11, 2018 5:42 AM