Need to script to ask three questions, receive input and then execute a process.

Discussion in 'Scripting' started by Spin, Aug 30, 2008.

  1. Spin

    Spin Guest

    Gurus,

    I need a script which will when launched, ask for a computer name (and
    receive operator input), ask for a username (and receive operator input),
    and then finally ask for a password (and receive operator input). It will
    then kick off a process to install software on a remote machine. I actually
    have the last part completed - what I do is call psexec.exe to execute a CMD
    prompt on the target machine and initiates a silent software installation.
    Administrator rights on the target machine is assumed, if not, I expect the
    script to fail. What I need is help on the three "input" parts of the
    script. Any ideas?
     
    Spin, Aug 30, 2008
    #1
    1. Advertisements

  2. Download a copy of script56.chm, then have a look at the InputBox method.
     
    Pegasus \(MVP\), Aug 30, 2008
    #2
    1. Advertisements

  3. Spin

    Al Dunbar Guest

    .... or, as you already seem to be working with batch, you could do it this
    way:

    (set/p comp=enter computer name: )
    (set/p user=enter user name: )
    (set/p pass=enter password: )
    psexec \\%comp% -u %user% -p %pass% yourbatch.cmd

    /Al
     
    Al Dunbar, Aug 30, 2008
    #3
  4. Spin

    Spin Guest

    Worked!!!! Thx!!!!!!!!!!!!!!
     
    Spin, Aug 31, 2008
    #4
  5. Spin

    Al Dunbar Guest

    Which one did you use, the batch solution or the vbscript one?

    /Al
     
    Al Dunbar, Aug 31, 2008
    #5
  6. Spin

    Spin Guest

    Your batch solution.
     
    Spin, Aug 31, 2008
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.