Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > Need to script to ask three questions, receive input and then execute a process.

Reply
Thread Tools Display Modes

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

 
 
Spin
Guest
Posts: n/a

 
      08-30-2008
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

 
Reply With Quote
 
 
 
 
Pegasus \(MVP\)
Guest
Posts: n/a

 
      08-30-2008

"Spin" <> wrote in message
news:...
> 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


Download a copy of script56.chm, then have a look at the InputBox method.


 
Reply With Quote
 
Al Dunbar
Guest
Posts: n/a

 
      08-30-2008

"Pegasus (MVP)" <> wrote in message
news:ei%...
>
> "Spin" <> wrote in message
> news:...
>> 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

>
> Download a copy of script56.chm, then have a look at the InputBox method.


.... 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


 
Reply With Quote
 
Spin
Guest
Posts: n/a

 
      08-31-2008
Worked!!!! Thx!!!!!!!!!!!!!!
 
Reply With Quote
 
Al Dunbar
Guest
Posts: n/a

 
      08-31-2008


"Spin" <> wrote in message
news:...
> Worked!!!! Thx!!!!!!!!!!!!!!


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

/Al


 
Reply With Quote
 
Spin
Guest
Posts: n/a

 
      08-31-2008
Your batch solution.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
redundant questions when you execute any command Stop stupid questions after executions Windows Vista General Discussion 4 01-14-2008 01:03 PM
Script to execute a process if on a certain LAN lozza Scripting 0 12-06-2007 03:23 PM
Execute Remote Process visible Devron Blatchford Scripting 2 05-26-2005 09:56 PM
Execute Process on Remote Computer Scripting 0 07-19-2004 06:49 PM
execute a script from a runas script Scripting 0 11-06-2003 12:46 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59