Results 1 to 17 of 17

Thread: Running a DOS Command WITHOUT the Command window appearing

Hybrid View

  1. #1
    Frenzied Member Jmacp's Avatar
    Join Date
    Jul 2003
    Location
    UK
    Posts
    1,959
    VB Code:
    1. Shell "cmd /k ping 127.0.0.1 >e:\ping.txt ", vbHide
    But cmd is still going to be loaded as a process.

  2. #2
    Member
    Join Date
    Oct 2012
    Posts
    61

    Re: Running a DOS Command WITHOUT the Command window appearing

    Quote Originally Posted by Jmacp View Post
    VB Code:
    1. Shell "cmd /k ping 127.0.0.1 >e:\ping.txt ", vbHide
    But cmd is still going to be loaded as a process.
    I was searching how to do this for quite some time... I was about to create a thread too..
    Thanks a lot...

    It'd be great if you could elaborate what /k is.
    Also what does the > before the Location of the File mean?
    Last edited by TheThinker; Dec 5th, 2012 at 11:15 AM.

  3. #3
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,060

    Re: Running a DOS Command WITHOUT the Command window appearing

    Quote Originally Posted by TheThinker View Post
    Also what does the > before the Location of the File mean?
    It's called Redirection.
    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

Posting Permissions

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



Click Here to Expand Forum to Full Width