command line paramater printing

  • Thread starter Thread starter surferboy
  • Start date Start date
S

surferboy

i just have one simple question. How can i print the
command line paramaters to a text file. I know that you
can print them by going the cmd window and typing the
name + /? but i want that printed to a text file instead
of a window.
thanks in advance.
surferboy
 
Try putting a " > file.txt " at the end of the line (without the quotes.)
 
do you know of a way to use vbscript to read the info
from that window and then print it to a file?
thanks
surferboy
 
surferboy said:
do you know of a way to use vbscript to read the info
from that window and then print it to a file?

Hi

With AutoItX, you can make a "hack", but it is using a SendKey method, and
therefor not trustworty in all cases ;-)

Here you go:

Set oAutoIt = CreateObject("AutoItX.Control")
Set oShell = CreateObject("WScript.Shell")

' Empy clipboard
oAutoIt.ClipPut ""

' Minimize all windows
oAutoIt.WinMinimizeAll()
WScript.Sleep 2000

oShell.Run "msjavx86.exe /?"

i = 0
Do
WScript.Sleep 1000
oAutoIt.Send "^c"
sText = oAutoIt.ClipGet()
i = i + 1
Loop Until (sText <> "") Or (i > 10)

If sText <> "" Then
oAutoIt.Send "{ENTER}"
MsgBox sText

Else
MsgBox "No text found"
End If


AutoIt/AutoItX is free and can be found here:
http://www.hiddensoft.com/AutoIt/
 
Back
Top