Re: Write instructions at the command prompt
- From: "Pegasus [MVP]" <news@xxxxxxxxxxxxx>
- Date: Thu, 16 Jul 2009 15:13:42 +0200
"xp" <xp@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:59D78EEA-807B-4517-923E-9391275B7CB0@xxxxxxxxxxxxxxxx
Using Windows XP and Office 2007;
I need to code a command line instruction using a VBScript file; I've
coded
VBScript for other purposes, but I don't know where to start for something
like this. Is there a chance someone could post a generic way to access
the
command prompt and then write some instructions?
Thanks!
I can think of three ways:
- Use the Run method to open a Command Prompt, then use the SendKeys method
of the Wscript.Shell object to send your keystrokes. This is easy to program
but it is also clumsy and unreliable.
- Use the Run method to invoke a batch file of your choice.
- Use the Exec method to invoke a batch file of your choice.
I suggest you download the help file script56.chm from the Microsoft site to
see detailed examples of the various methods.
.
- Follow-Ups:
- Re: Write instructions at the command prompt
- From: Tom Lavedas
- Re: Write instructions at the command prompt
- References:
- Prev by Date: Write instructions at the command prompt
- Next by Date: Exec Method Puzzle
- Previous by thread: Write instructions at the command prompt
- Next by thread: Re: Write instructions at the command prompt
- Index(es):
Relevant Pages
|