+ Post New Thread
Results 1 to 3 of 3
Scripts Thread, How can i get a script to ask for input and then use that input in a command? in Coding and Web Development; I am currently going through 19 laptops where I need to change the windows 7 key. I have a batch ...
  1. #1
    reggiep's Avatar
    Join Date
    Apr 2008
    Location
    In the vast area of space and time
    Posts
    1,526
    Thank Post
    506
    Thanked 54 Times in 48 Posts
    Rep Power
    28

    How can i get a script to ask for input and then use that input in a command?

    I am currently going through 19 laptops where I need to change the windows 7 key. I have a batch file I can run to do this but need to edit it each time like so...
    Code:
    slmgr.vbs -ipk gvh6k-00000-99999-88888-77777
    Is there a way I can get the batch file to ask me to input the key when it is run?

    I know I need to use % somewhere!

    Thanks
    Last edited by reggiep; 15th February 2011 at 03:36 PM. Reason: spelling

  2. #2
    djwingfield's Avatar
    Join Date
    Mar 2010
    Posts
    33
    Thank Post
    7
    Thanked 10 Times in 10 Posts
    Rep Power
    10

    Input within CMD

    Morning,

    The syntax for SET,

    "SET /P variable=[promptString]"

    So what you will need is the following script,

    Code:
    set /p key=
    slmgr.vbs -ipk %key%

  3. Thanks to djwingfield from:

    reggiep (16th February 2011)

  4. #3
    reggiep's Avatar
    Join Date
    Apr 2008
    Location
    In the vast area of space and time
    Posts
    1,526
    Thank Post
    506
    Thanked 54 Times in 48 Posts
    Rep Power
    28
    Wow thanks for the quick reply djwingfield. I shall give that a go and add it to my knowledge base!

SHARE:
+ Post New Thread

Similar Threads

  1. No signal input
    By Yupyup in forum Windows
    Replies: 15
    Last Post: 16th December 2010, 10:49 AM
  2. Audacity - cannot select input
    By Number6 in forum Windows
    Replies: 6
    Last Post: 19th March 2010, 11:12 AM
  3. Input please
    By neon in forum Windows Server 2000/2003
    Replies: 15
    Last Post: 4th November 2009, 09:19 PM
  4. NO INPUT SIGNAL
    By bats in forum Windows
    Replies: 11
    Last Post: 10th April 2009, 04:49 PM
  5. scratch team want input
    By SimpleSi in forum Educational Software
    Replies: 0
    Last Post: 18th January 2009, 04:48 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •