Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7022153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:32:39+00:00 2026-05-27T23:32:39+00:00

the following code is part from my VB6 program I used shell command in

  • 0

the following code is part from my VB6 program

I used shell command in the VB in order to execute the pscp.exe with the flags and arguments

my problem is , when VB run the line:

      Shell strCommand, 1  

its also open the CMD window for 2-4 seconds (CMD popup window)

my question – is it possible to run the “Shell strCommand, 1” in way that CMD window will not opened?

I mean – I not want to see any CMD popup window when I run VB application

  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 & " -sftp -l " & pUser & " -pw " & pPass & " " & pHost & ":" & pRemotePath & " " & pFile


  Shell strCommand, 1  
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:32:40+00:00Added an answer on May 27, 2026 at 11:32 pm

    You can use hidden focus:

    Shell strCommand, vbHide
    

    or

    Shell strCommand, 0
    

    For other focus types look Here
    or http://msdn.microsoft.com/en-us/library/aa242087%28v=VS.60%29.aspx (thanks to MarkJ for the link)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code from a GWT Project that is part of the
The following code is from a tutorial ( http://net.tutsplus.com/php/creating-a-php5-framework-part-1/ ), not mine. I have
I am trying to execute the following code from a firefox extension but it
The following code is from the Facebook Android SDK, and is used for all
Why in following code don't work this part if(!$(this).val()){... from code and this match
I am using the following code as part of an autocomplete script to avoid
I have the following code, which is run every 10ms as part of a
Google optimizer includes the following snippet as part of their conversion code. Unfortunately, the
The following code should find the appropriate project tag and remove it from the
The following code is part of a WCF service. Will eventWatcher take up a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.