Windows – 如何运行shell命令,而不在VB6中打开CMD窗口
发布时间:2020-12-13 22:45:10 所属栏目:Windows 来源:网络整理
导读:以下代码是我VB6程序的一部分 我在VB中使用了shell命令,以便使用标志和参数执行pscp.exe 我的问题是,当VB运行行时: Shell strCommand,1 它也打开CMD窗口2-4秒(CMD弹出窗口) 我的问题 – 是否可以运行“Shell strCommand 1”,CMD窗口不会打开? 我的意思是
以下代码是我VB6程序的一部分
我在VB中使用了shell命令,以便使用标志和参数执行pscp.exe 我的问题是,当VB运行行时: Shell strCommand,1 它也打开CMD窗口2-4秒(CMD弹出窗口) 我的问题 – 是否可以运行“Shell strCommand 1”,CMD窗口不会打开? 我的意思是 – 当我运行VB应用程序时,我不想看到任何CMD弹出窗口 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
你可以使用隐藏的焦点:
Shell strCommand,vbHide 要么 Shell strCommand,0 对于其他焦点类型,请查看Here (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- windows – 如何通过命令行查询我的系统以查看是否安装了KB
- windows-8 – 试图获得Windows 8开发人员许可但得到错误0x8
- windows-server-2008 – 如何拒绝Windows中共享/文件夹的执
- windows-server-2008 – Server 2008远程应用程序
- go 工具链目前[不支持编译 windows 下的动态链接库]解决方案
- 在Windows中使用vCard进行UTF8编码
- windows – 如何修复显示乱码的PuTTY?
- Windows如何知道如何解决mDNS查询?
- 为什么Rtools 3.1不支持Windows上的C 11
- Win10中MySQL8.0.11的配置文件my.ini的位置