title: How to run a shell command without opening a CMD window in VB6
body: <p>the following code is part from my VB6 program</p>
  
  <p>I used shell command  in the VB in order to execute the pscp.exe with the flags and arguments</p>
  
  <p>my problem is , when VB run the line:</p>
  
  <pre><code>      Shell strCommand, 1  
  </code></pre>
  
  <p>its also open the CMD window for 2-4 seconds (CMD popup window)</p>
  
  <p>my question - is it possible to run the "Shell strCommand, 1"  in way that CMD window will not opened?</p>
  
  <p>I mean - I not want to see any CMD popup window when I run VB application</p>
  
  <pre><code>  Const cstrSftp As String = "D:\pscp.exe"
    Dim strCommand As String
    Dim pUser As String
    Dim pPass As String
    Dim pHost As String
    Dim pFile As String
    Dim pRemotePath As String
    pUser = "root"
    pPass = "pass123"
    pHost = "110.218.201.15"
    pFile = """D:\scan_ip.ksh""" 
    pRemotePath = "/var/tmp"
  
    strCommand = cstrSftp &amp; " -sftp -l " &amp; pUser &amp; " -pw " &amp; pPass &amp; " " &amp; pHost &amp; ":" &amp; pRemotePath &amp; " " &amp; pFile
  
  
    Shell strCommand, 1  
  </code></pre>